Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
7b567597
Commit
7b567597
authored
Sep 06, 2017
by
Annabel Dunstone Gray
Committed by
Ruben Davila
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs; start on light theme
parent
1245cccf
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
34 deletions
+67
-34
app/assets/stylesheets/framework.scss
app/assets/stylesheets/framework.scss
+1
-1
app/assets/stylesheets/framework/gitlab-theme.scss
app/assets/stylesheets/framework/gitlab-theme.scss
+19
-2
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+25
-13
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+13
-13
config/gitlab.yml.example
config/gitlab.yml.example
+3
-1
lib/gitlab/themes.rb
lib/gitlab/themes.rb
+3
-1
spec/helpers/preferences_helper_spec.rb
spec/helpers/preferences_helper_spec.rb
+2
-2
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-1
No files found.
app/assets/stylesheets/framework.scss
View file @
7b567597
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
@import
"framework/flash"
;
@import
"framework/flash"
;
@import
"framework/forms"
;
@import
"framework/forms"
;
@import
"framework/gfm"
;
@import
"framework/gfm"
;
@import
"framework/gitlab-theme
.scss
"
;
@import
"framework/gitlab-theme"
;
@import
"framework/header"
;
@import
"framework/header"
;
@import
"framework/highlight"
;
@import
"framework/highlight"
;
@import
"framework/issue_box"
;
@import
"framework/issue_box"
;
...
...
app/assets/stylesheets/framework/gitlab-theme.scss
View file @
7b567597
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
border-right
:
1px
solid
$color-800
;
border-right
:
1px
solid
$color-800
;
}
}
.
search-input
:
:
placeholder
{
.
search-input
:
:
placeholder
{
color
:
rgba
(
$color-200
,
.8
);
color
:
rgba
(
$color-200
,
.8
);
}
}
...
@@ -173,10 +173,27 @@ body {
...
@@ -173,10 +173,27 @@ body {
}
}
&
.ui_dark
{
&
.ui_dark
{
@include
gitlab-theme
(
$dark-100
,
$dark-200
,
$dark-500
,
$dark-700
,
$dark-800
,
$dark-900
);
@include
gitlab-theme
(
$theme-gray-100
,
$theme-gray-200
,
$theme-gray-500
,
$theme-gray-700
,
$theme-gray-800
,
$theme-gray-900
);
}
&
.ui_light
{
@include
gitlab-theme
(
$theme-gray-900
,
$theme-gray-700
,
$theme-gray-800
,
$theme-gray-500
,
$theme-gray-200
,
$theme-gray-100
);
header
.navbar-gitlab-new
{
background
:
linear-gradient
(
to
right
,
$theme-gray-100
,
$theme-gray-100
);
box-shadow
:
0
2px
0
0
$border-color
;
.logo-text
svg
{
fill
:
$theme-gray-900
;
}
}
}
}
&
.ui_blue
{
&
.ui_blue
{
@include
gitlab-theme
(
$theme-blue-100
,
$theme-blue-200
,
$theme-blue-500
,
$theme-blue-700
,
$theme-blue-800
,
$theme-blue-900
);
@include
gitlab-theme
(
$theme-blue-100
,
$theme-blue-200
,
$theme-blue-500
,
$theme-blue-700
,
$theme-blue-800
,
$theme-blue-900
);
}
}
&
.ui_green
{
@include
gitlab-theme
(
$theme-green-100
,
$theme-green-200
,
$theme-green-500
,
$theme-green-700
,
$theme-green-800
,
$theme-green-900
);
}
}
}
app/assets/stylesheets/framework/variables.scss
View file @
7b567597
...
@@ -88,19 +88,19 @@ $indigo-800: #393982;
...
@@ -88,19 +88,19 @@ $indigo-800: #393982;
$indigo-900
:
#292961
;
$indigo-900
:
#292961
;
$indigo-950
:
#1a1a40
;
$indigo-950
:
#1a1a40
;
$
dark-50
:
#fafafa
;
$
theme-gray-50
:
#fafafa
;
$
dark
-100
:
#f2f2f2
;
$
theme-gray
-100
:
#f2f2f2
;
$
dark
-200
:
#dfdfdf
;
$
theme-gray
-200
:
#dfdfdf
;
$
dark
-300
:
#cccccc
;
$
theme-gray
-300
:
#cccccc
;
$
dark
-400
:
#bababa
;
$
theme-gray
-400
:
#bababa
;
$
dark
-500
:
#a7a7a7
;
$
theme-gray
-500
:
#a7a7a7
;
$
dark
-600
:
#949494
;
$
theme-gray
-600
:
#949494
;
$
dark
-700
:
#707070
;
$
theme-gray
-700
:
#707070
;
$
dark
-800
:
#4f4f4f
;
$
theme-gray
-800
:
#4f4f4f
;
$
dark
-900
:
#2e2e2e
;
$
theme-gray
-900
:
#2e2e2e
;
$
dark
-950
:
#1f1f1f
;
$
theme-gray
-950
:
#1f1f1f
;
$theme-blue-50
:
#f4f8fc
;
$theme-blue-50
:
#f4f8fc
;
$theme-blue-100
:
#e6edf5
;
$theme-blue-100
:
#e6edf5
;
$theme-blue-200
:
#c8d7e6
;
$theme-blue-200
:
#c8d7e6
;
$theme-blue-300
:
#97b3cf
;
$theme-blue-300
:
#97b3cf
;
...
@@ -112,6 +112,18 @@ $theme-blue-800: #25496e;
...
@@ -112,6 +112,18 @@ $theme-blue-800: #25496e;
$theme-blue-900
:
#1a3652
;
$theme-blue-900
:
#1a3652
;
$theme-blue-950
:
#0f2235
;
$theme-blue-950
:
#0f2235
;
$theme-green-50
:
#f2faf6
;
$theme-green-100
:
#e4f3ea
;
$theme-green-200
:
#c0dfcd
;
$theme-green-300
:
#8ac2a1
;
$theme-green-400
:
#52a274
;
$theme-green-500
:
#35935c
;
$theme-green-600
:
#288a50
;
$theme-green-700
:
#1c7441
;
$theme-green-800
:
#145d33
;
$theme-green-900
:
#0d4524
;
$theme-green-950
:
#072d16
;
$black
:
#000
;
$black
:
#000
;
$black-transparent
:
rgba
(
0
,
0
,
0
,
0
.3
);
$black-transparent
:
rgba
(
0
,
0
,
0
,
0
.3
);
...
...
app/assets/stylesheets/new_nav.scss
View file @
7b567597
...
@@ -12,6 +12,17 @@ header.navbar-gitlab-new {
...
@@ -12,6 +12,17 @@ header.navbar-gitlab-new {
border-bottom
:
0
;
border-bottom
:
0
;
min-height
:
$new-navbar-height
;
min-height
:
$new-navbar-height
;
.logo-text
{
line-height
:
initial
;
svg
{
width
:
55px
;
height
:
14px
;
margin
:
0
;
fill
:
$white-light
;
}
}
.header-content
{
.header-content
{
display
:
-
webkit-flex
;
display
:
-
webkit-flex
;
display
:
flex
;
display
:
flex
;
...
@@ -37,10 +48,10 @@ header.navbar-gitlab-new {
...
@@ -37,10 +48,10 @@ header.navbar-gitlab-new {
img
{
img
{
height
:
28px
;
height
:
28px
;
margin-right
:
10
px
;
margin-right
:
8
px
;
}
}
>
a
{
a
{
display
:
-
webkit-flex
;
display
:
-
webkit-flex
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -53,17 +64,6 @@ header.navbar-gitlab-new {
...
@@ -53,17 +64,6 @@ header.navbar-gitlab-new {
margin-right
:
8px
;
margin-right
:
8px
;
}
}
}
}
.logo-text
{
line-height
:
initial
;
svg
{
width
:
55px
;
height
:
14px
;
margin
:
0
;
fill
:
$white-light
;
}
}
}
}
}
}
...
...
config/gitlab.yml.example
View file @
7b567597
...
@@ -79,7 +79,9 @@ production: &base
...
@@ -79,7 +79,9 @@ production: &base
## Default theme ID
## Default theme ID
## 1 - Indigo
## 1 - Indigo
## 2 - Dark
## 2 - Dark
## 3 - Blue
## 3 - Light
## 4 - Blue
## 5 - Green
# default_theme: 1 # default: 1
# default_theme: 1 # default: 1
## Automatic issue closing
## Automatic issue closing
...
...
lib/gitlab/themes.rb
View file @
7b567597
...
@@ -14,7 +14,9 @@ module Gitlab
...
@@ -14,7 +14,9 @@ module Gitlab
THEMES
=
[
THEMES
=
[
Theme
.
new
(
1
,
'Indigo'
,
'ui_indigo'
),
Theme
.
new
(
1
,
'Indigo'
,
'ui_indigo'
),
Theme
.
new
(
2
,
'Dark'
,
'ui_dark'
),
Theme
.
new
(
2
,
'Dark'
,
'ui_dark'
),
Theme
.
new
(
3
,
'Blue'
,
'ui_blue'
)
Theme
.
new
(
3
,
'Light'
,
'ui_light'
),
Theme
.
new
(
4
,
'Blue'
,
'ui_blue'
),
Theme
.
new
(
5
,
'Green'
,
'ui_green'
),
].
freeze
].
freeze
# Convenience method to get a space-separated String of all the theme
# Convenience method to get a space-separated String of all the theme
...
...
spec/helpers/preferences_helper_spec.rb
View file @
7b567597
...
@@ -31,7 +31,7 @@ describe PreferencesHelper do
...
@@ -31,7 +31,7 @@ describe PreferencesHelper do
it
"returns user's theme's css_class"
do
it
"returns user's theme's css_class"
do
stub_user
(
theme_id:
3
)
stub_user
(
theme_id:
3
)
expect
(
helper
.
user_application_theme
).
to
eq
'ui_
green
'
expect
(
helper
.
user_application_theme
).
to
eq
'ui_
light
'
end
end
it
'returns the default when id is invalid'
do
it
'returns the default when id is invalid'
do
...
@@ -39,7 +39,7 @@ describe PreferencesHelper do
...
@@ -39,7 +39,7 @@ describe PreferencesHelper do
allow
(
Gitlab
.
config
.
gitlab
).
to
receive
(
:default_theme
).
and_return
(
2
)
allow
(
Gitlab
.
config
.
gitlab
).
to
receive
(
:default_theme
).
and_return
(
2
)
expect
(
helper
.
user_application_theme
).
to
eq
'ui_
charcoal
'
expect
(
helper
.
user_application_theme
).
to
eq
'ui_
dark
'
end
end
end
end
...
...
spec/models/user_spec.rb
View file @
7b567597
...
@@ -727,7 +727,7 @@ describe User do
...
@@ -727,7 +727,7 @@ describe User do
it
"applies defaults to user"
do
it
"applies defaults to user"
do
expect
(
user
.
projects_limit
).
to
eq
(
123
)
expect
(
user
.
projects_limit
).
to
eq
(
123
)
expect
(
user
.
can_create_group
).
to
be_falsey
expect
(
user
.
can_create_group
).
to
be_falsey
expect
(
user
.
theme_id
).
to
eq
(
1
)
expect
(
user
.
theme_id
).
to
eq
(
2
)
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment