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
Boxiang Sun
gitlab-ce
Commits
79a842c5
Commit
79a842c5
authored
Jun 21, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed scss-lint job
only display the toggle setting in development env for now
parent
1c2547d2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
26 deletions
+34
-26
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+4
-0
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+4
-6
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+3
-2
app/views/profiles/preferences/show.html.haml
app/views/profiles/preferences/show.html.haml
+19
-18
No files found.
app/assets/stylesheets/framework/variables.scss
View file @
79a842c5
...
@@ -74,6 +74,10 @@ $red-700: #a62d19;
...
@@ -74,6 +74,10 @@ $red-700: #a62d19;
$red-800
:
#8b2615
;
$red-800
:
#8b2615
;
$red-900
:
#711e11
;
$red-900
:
#711e11
;
$purple-700
:
#2d0573
;
$purple-800
:
#451c7f
;
$purple-900
:
#380d75
;
$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 @
79a842c5
...
@@ -2,11 +2,9 @@
...
@@ -2,11 +2,9 @@
@import
'framework/tw_bootstrap_variables'
;
@import
'framework/tw_bootstrap_variables'
;
@import
"bootstrap/variables"
;
@import
"bootstrap/variables"
;
$new-navbar-bg
:
#380D75
;
header
.navbar-gitlab-new
{
header
.navbar-gitlab-new
{
color
:
$gray-normal
;
color
:
$gray-normal
;
background-color
:
$
new-navbar-bg
;
background-color
:
$
purple-900
;
.header-content
{
.header-content
{
padding-left
:
0
;
padding-left
:
0
;
...
@@ -134,7 +132,7 @@ header.navbar-gitlab-new {
...
@@ -134,7 +132,7 @@ header.navbar-gitlab-new {
.search
{
.search
{
form
{
form
{
border-color
:
#2D0573
;
border-color
:
$purple-700
;
&
:hover
{
&
:hover
{
border-color
:
rgba
(
$white-light
,
.5
);
border-color
:
rgba
(
$white-light
,
.5
);
...
@@ -147,7 +145,7 @@ header.navbar-gitlab-new {
...
@@ -147,7 +145,7 @@ header.navbar-gitlab-new {
form
,
form
,
.search-input
{
.search-input
{
background-color
:
#451C7F
;
background-color
:
$purple-800
;
}
}
.search-input
{
.search-input
{
...
@@ -160,7 +158,7 @@ header.navbar-gitlab-new {
...
@@ -160,7 +158,7 @@ header.navbar-gitlab-new {
.location-badge
{
.location-badge
{
color
:
$white-light
;
color
:
$white-light
;
background-color
:
$
new-navbar-bg
;
background-color
:
$
purple-900
;
}
}
&
.search-active
{
&
.search-active
{
...
...
app/helpers/application_helper.rb
View file @
79a842c5
...
@@ -301,6 +301,10 @@ module ApplicationHelper
...
@@ -301,6 +301,10 @@ module ApplicationHelper
end
end
end
end
def
can_toggle_new_nav?
Rails
.
env
.
development?
end
def
show_new_nav?
def
show_new_nav?
cookies
[
"new_nav"
]
==
"true"
cookies
[
"new_nav"
]
==
"true"
end
end
...
...
app/views/layouts/header/_default.html.haml
View file @
79a842c5
...
@@ -74,8 +74,9 @@
...
@@ -74,8 +74,9 @@
=
link_to
"Profile"
,
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
=
link_to
"Profile"
,
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
%li
%li
=
link_to
"Settings"
,
profile_path
=
link_to
"Settings"
,
profile_path
%li
-
if
can_toggle_new_nav?
=
link_to
"Turn on new nav"
,
profile_preferences_path
(
anchor:
"new-navigation"
)
%li
=
link_to
"Turn on new nav"
,
profile_preferences_path
(
anchor:
"new-navigation"
)
%li
.divider
%li
.divider
%li
%li
=
link_to
"Sign out"
,
destroy_user_session_path
,
method: :delete
,
class:
"sign-out-link"
=
link_to
"Sign out"
,
destroy_user_session_path
,
method: :delete
,
class:
"sign-out-link"
...
...
app/views/profiles/preferences/show.html.haml
View file @
79a842c5
...
@@ -15,24 +15,25 @@
...
@@ -15,24 +15,25 @@
.preview
=
image_tag
"
#{
scheme
.
css_class
}
-scheme-preview.png"
.preview
=
image_tag
"
#{
scheme
.
css_class
}
-scheme-preview.png"
=
f
.
radio_button
:color_scheme_id
,
scheme
.
id
=
f
.
radio_button
:color_scheme_id
,
scheme
.
id
=
scheme
.
name
=
scheme
.
name
.col-sm-12
-
if
can_toggle_new_nav?
%hr
.col-sm-12
.col-lg-3.profile-settings-sidebar
#new-navigation
%hr
%h4
.prepend-top-0
.col-lg-3.profile-settings-sidebar
#new-navigation
New Navigation
%h4
.prepend-top-0
%p
New Navigation
This setting allows you to turn on or off the new upcoming navigation concept.
%p
=
succeed
'.'
do
This setting allows you to turn on or off the new upcoming navigation concept.
=
link_to
'Learn more'
,
''
,
target:
'_blank'
=
succeed
'.'
do
.col-lg-9.syntax-theme
=
link_to
'Learn more'
,
''
,
target:
'_blank'
=
label_tag
do
.col-lg-9.syntax-theme
.preview
=
image_tag
"old_nav.png"
=
label_tag
do
%input
.js-experiment-feature-toggle
{
type:
"radio"
,
value:
"false"
,
name:
"new_nav"
,
checked:
!
show_new_nav?
}
.preview
=
image_tag
"old_nav.png"
Old
%input
.js-experiment-feature-toggle
{
type:
"radio"
,
value:
"false"
,
name:
"new_nav"
,
checked:
!
show_new_nav?
}
=
label_tag
do
Old
.preview
=
image_tag
"new_nav.png"
=
label_tag
do
%input
.js-experiment-feature-toggle
{
type:
"radio"
,
value:
"true"
,
name:
"new_nav"
,
checked:
show_new_nav?
}
.preview
=
image_tag
"new_nav.png"
New
%input
.js-experiment-feature-toggle
{
type:
"radio"
,
value:
"true"
,
name:
"new_nav"
,
checked:
show_new_nav?
}
New
.col-sm-12
.col-sm-12
%hr
%hr
.col-lg-3.profile-settings-sidebar
.col-lg-3.profile-settings-sidebar
...
...
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