Commit dbc96f05 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Refactor left navigation sidebar to use 2 levels

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 18dd525d
...@@ -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;
......
...@@ -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;
......
...@@ -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'
......
...@@ -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')
......
.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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment