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 @@
background: $color-darker;
.sidebar-user {
border-top: 1px solid $color;
background: $color-darker;
color: $color-light;
......
......@@ -312,7 +312,6 @@
.page-sidebar-expanded {
.complex-sidebar {
margin-bottom: 100px;
display: inline-block;
.nav-sidebar {
......@@ -337,6 +336,7 @@
}
.nav-secondary {
padding-bottom: 100px;
border-left: 1px solid rgba(255, 255, 255, 0.1);
float: left;
width: 168px;
......
......@@ -8,12 +8,16 @@
.gitlab-text-container
%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}"
- elsif current_user
= render 'layouts/nav/dashboard'
- else
= render 'layouts/nav/explore'
= render "layouts/nav/#{primary_sidebar}"
.collapse-nav
= render partial: 'layouts/collapse_button'
......
......@@ -48,7 +48,6 @@
%span
Help
%li.separate-item
= nav_link(controller: :profile) do
= link_to profile_path, title: 'Profile Settings', data: {placement: 'bottom'} do
= icon('user fw')
......
.complex-sidebar
.nav-primary
= render 'layouts/nav/dashboard'
.nav-secondary
%ul.nav.nav-sidebar
%ul.nav.nav-sidebar
= nav_link(path: 'projects#show', html_options: {class: 'home'}) do
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
= icon('bookmark fw')
......@@ -102,7 +98,7 @@
Snippets
- 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
= icon('cogs fw')
%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