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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dbc96f05
Commit
dbc96f05
authored
Apr 01, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor left navigation sidebar to use 2 levels
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
18dd525d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
109 deletions
+109
-109
app/assets/stylesheets/framework/gitlab-theme.scss
app/assets/stylesheets/framework/gitlab-theme.scss
+1
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+1
-1
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+9
-5
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+0
-1
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+98
-102
No files found.
app/assets/stylesheets/framework/gitlab-theme.scss
View file @
dbc96f05
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
background
:
$color-darker
;
background
:
$color-darker
;
.sidebar-user
{
.sidebar-user
{
border-top
:
1px
solid
$color
;
background
:
$color-darker
;
background
:
$color-darker
;
color
:
$color-light
;
color
:
$color-light
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
dbc96f05
...
@@ -312,7 +312,6 @@
...
@@ -312,7 +312,6 @@
.page-sidebar-expanded
{
.page-sidebar-expanded
{
.complex-sidebar
{
.complex-sidebar
{
margin-bottom
:
100px
;
display
:
inline-block
;
display
:
inline-block
;
.nav-sidebar
{
.nav-sidebar
{
...
@@ -337,6 +336,7 @@
...
@@ -337,6 +336,7 @@
}
}
.nav-secondary
{
.nav-secondary
{
padding-bottom
:
100px
;
border-left
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.1
);
border-left
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.1
);
float
:
left
;
float
:
left
;
width
:
168px
;
width
:
168px
;
...
...
app/views/layouts/_page.html.haml
View file @
dbc96f05
...
@@ -8,12 +8,16 @@
...
@@ -8,12 +8,16 @@
.gitlab-text-container
.gitlab-text-container
%h3
GitLab
%h3
GitLab
-
if
defined?
(
sidebar
)
&&
sidebar
-
primary_sidebar
=
current_user
?
'dashboard'
:
'explore'
-
if
defined?
(
sidebar
)
&&
sidebar
&&
sidebar
!=
primary_sidebar
.complex-sidebar
.nav-primary
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.nav-secondary
=
render
"layouts/nav/
#{
sidebar
}
"
=
render
"layouts/nav/
#{
sidebar
}
"
-
elsif
current_user
=
render
'layouts/nav/dashboard'
-
else
-
else
=
render
'layouts/nav/explore'
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.collapse-nav
.collapse-nav
=
render
partial:
'layouts/collapse_button'
=
render
partial:
'layouts/collapse_button'
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
dbc96f05
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
%span
%span
Help
Help
%li
.separate-item
=
nav_link
(
controller: :profile
)
do
=
nav_link
(
controller: :profile
)
do
=
link_to
profile_path
,
title:
'Profile Settings'
,
data:
{
placement:
'bottom'
}
do
=
link_to
profile_path
,
title:
'Profile Settings'
,
data:
{
placement:
'bottom'
}
do
=
icon
(
'user fw'
)
=
icon
(
'user fw'
)
...
...
app/views/layouts/nav/_project.html.haml
View file @
dbc96f05
.complex-sidebar
%ul
.nav.nav-sidebar
.nav-primary
=
render
'layouts/nav/dashboard'
.nav-secondary
%ul
.nav.nav-sidebar
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
project_path
(
@project
),
title:
'Project'
,
class:
'shortcuts-project'
do
=
link_to
project_path
(
@project
),
title:
'Project'
,
class:
'shortcuts-project'
do
=
icon
(
'bookmark fw'
)
=
icon
(
'bookmark fw'
)
...
@@ -102,7 +98,7 @@
...
@@ -102,7 +98,7 @@
Snippets
Snippets
-
if
project_nav_tab?
:settings
-
if
project_nav_tab?
:settings
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
separate-item
"
})
do
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
do
=
icon
(
'cogs fw'
)
=
icon
(
'cogs fw'
)
%span
%span
...
...
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