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
7c501895
Commit
7c501895
authored
Jun 02, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement compact side nav
parent
3fd0b364
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
143 deletions
+47
-143
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+13
-23
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+18
-96
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-1
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+5
-9
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+10
-14
No files found.
app/assets/stylesheets/framework/header.scss
View file @
7c501895
...
@@ -79,13 +79,17 @@ header {
...
@@ -79,13 +79,17 @@ header {
&
.header-collapsed
{
&
.header-collapsed
{
padding
:
0
16px
;
padding
:
0
16px
;
.side-nav-toggle
{
display
:
block
;
}
}
}
.side-nav-toggle
{
.side-nav-toggle
{
display
:
none
;
display
:
none
;
position
:
absolute
;
position
:
absolute
;
left
:
-10px
;
left
:
-10px
;
margin
:
6
px
0
;
margin
:
8
px
0
;
padding
:
6px
10px
;
padding
:
6px
10px
;
border
:
none
;
border
:
none
;
background-color
:
$background-color
;
background-color
:
$background-color
;
...
@@ -97,10 +101,6 @@ header {
...
@@ -97,10 +101,6 @@ header {
&
:focus
{
&
:focus
{
outline
:
none
;
outline
:
none
;
}
}
@media
(
max-width
:
$screen-xs-min
)
{
display
:
block
;
}
}
}
}
}
...
@@ -171,31 +171,21 @@ header {
...
@@ -171,31 +171,21 @@ header {
}
}
}
}
@mixin
collapsed-header
{
margin-left
:
$sidebar_collapsed_width
;
}
.header-collapsed
{
.header-collapsed
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
0
;
@media
(
min-width
:
$screen-md-min
)
{
@include
collapsed-header
;
}
@media
(
max-width
:
$screen-xs-min
)
{
.header-content
{
margin-left
:
0
;
padding-left
:
30px
;
transition-duration
:
.3s
;
}
}
}
}
.header-expanded
{
.header-expanded
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
0
;
@media
(
min-width
:
$screen-md-min
)
{
.header-content
{
margin-left
:
$sidebar_width
;
padding-left
:
$sidebar_width
;
}
transition-duration
:
.3s
;
@media
(
max-width
:
$screen-xs-min
)
{
margin-left
:
0
;
}
}
}
}
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
7c501895
#logo
{
#logo
{
z-index
:
2
;
z-index
:
2
;
position
:
absolute
;
position
:
relative
;
width
:
58px
;
cursor
:
pointer
;
cursor
:
pointer
;
margin-top
:
8px
;
}
}
.page-with-sidebar
{
.page-with-sidebar
{
...
@@ -20,12 +18,6 @@
...
@@ -20,12 +18,6 @@
height
:
100%
;
height
:
100%
;
transition-duration
:
.3s
;
transition-duration
:
.3s
;
}
}
.gitlab-text-container-link
{
z-index
:
1
;
position
:
absolute
;
left
:
0
;
}
}
}
.sidebar-wrapper
{
.sidebar-wrapper
{
...
@@ -50,47 +42,8 @@
...
@@ -50,47 +42,8 @@
.sidebar-wrapper
{
.sidebar-wrapper
{
.header-logo
{
.header-logo
{
border-bottom
:
1px
solid
transparent
;
float
:
left
;
height
:
$header-height
;
height
:
$header-height
;
width
:
$sidebar_width
;
padding
:
8px
26px
;
position
:
fixed
;
z-index
:
999
;
overflow
:
hidden
;
transition-duration
:
.3s
;
a
{
float
:
left
;
height
:
$header-height
;
width
:
100%
;
padding-left
:
22px
;
overflow
:
hidden
;
outline
:
none
;
transition-duration
:
.3s
;
img
{
width
:
36px
;
height
:
36px
;
}
#tanuki-logo
,
img
{
float
:
left
;
}
.gitlab-text-container
{
width
:
230px
;
h3
{
width
:
158px
;
float
:
left
;
margin
:
0
;
margin-left
:
50px
;
font-size
:
19px
;
line-height
:
50px
;
font-weight
:
normal
;
}
}
}
&
:hover
{
&
:hover
{
background-color
:
#eee
;
background-color
:
#eee
;
...
@@ -98,7 +51,7 @@
...
@@ -98,7 +51,7 @@
}
}
.sidebar-user
{
.sidebar-user
{
padding
:
7
px
22px
;
padding
:
15
px
22px
;
position
:
fixed
;
position
:
fixed
;
bottom
:
40px
;
bottom
:
40px
;
width
:
$sidebar_width
;
width
:
$sidebar_width
;
...
@@ -126,8 +79,7 @@
...
@@ -126,8 +79,7 @@
.nav-sidebar
{
.nav-sidebar
{
margin-top
:
14
+
$header-height
;
margin
:
22px
0
;
margin-bottom
:
100px
;
transition-duration
:
.3s
;
transition-duration
:
.3s
;
list-style
:
none
;
list-style
:
none
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -145,13 +97,13 @@
...
@@ -145,13 +97,13 @@
}
}
a
{
a
{
padding
:
7px
15px
;
text-align
:
center
;
padding
:
8px
0
;
font-size
:
$gl-font-size
;
font-size
:
$gl-font-size
;
line-height
:
24px
;
line-height
:
24px
;
color
:
$gray
;
color
:
$gray
;
display
:
block
;
display
:
block
;
text-decoration
:
none
;
text-decoration
:
none
;
padding-left
:
23px
;
font-weight
:
normal
;
font-weight
:
normal
;
outline
:
none
;
outline
:
none
;
...
@@ -166,7 +118,6 @@
...
@@ -166,7 +118,6 @@
i
{
i
{
width
:
16px
;
width
:
16px
;
color
:
$gray-light
;
color
:
$gray-light
;
margin-right
:
13px
;
}
}
.count
{
.count
{
...
@@ -217,25 +168,13 @@
...
@@ -217,25 +168,13 @@
}
}
.page-sidebar-collapsed
{
.page-sidebar-collapsed
{
padding-left
:
$sidebar_collapsed_width
;
padding-left
:
0
;
@media
(
max-width
:
$screen-xs-min
)
{
padding-left
:
0
;
}
.sidebar-wrapper
{
.sidebar-wrapper
{
width
:
$sidebar_collapsed_width
;
width
:
0
;
@media
(
max-width
:
$screen-xs-min
)
{
width
:
0
;
}
.header-logo
{
.header-logo
{
width
:
$sidebar_collapsed_width
;
width
:
0
;
@media
(
max-width
:
$screen-xs-min
)
{
width
:
0
;
}
a
{
a
{
padding-left
:
(
$sidebar_collapsed_width
-
36
)
/
2
;
padding-left
:
(
$sidebar_collapsed_width
-
36
)
/
2
;
...
@@ -246,6 +185,10 @@
...
@@ -246,6 +185,10 @@
}
}
}
}
#logo
{
display
:
none
;
}
.nav-sidebar
{
.nav-sidebar
{
width
:
$sidebar_collapsed_width
;
width
:
$sidebar_collapsed_width
;
...
@@ -261,44 +204,23 @@
...
@@ -261,44 +204,23 @@
}
}
.collapse-nav
a
{
.collapse-nav
a
{
width
:
$sidebar_collapsed_width
;
width
:
0
;
@media
(
max-width
:
$screen-xs-min
)
{
width
:
0
;
}
}
}
.sidebar-user
{
.sidebar-user
{
padding-left
:
(
$sidebar_collapsed_width
-
36
)
/
2
;
width
:
0
;
width
:
$sidebar_collapsed_width
;
padding-left
:
0
;
padding-right
:
0
;
@media
(
max-width
:
$screen-xs-min
)
{
width
:
0
;
padding-left
:
0
;
padding-right
:
0
;
}
.username
{
.username
{
display
:
none
;
display
:
none
;
}
}
}
}
}
}
.layout-nav
{
padding-right
:
$sidebar_collapsed_width
;
@media
(
max-width
:
$screen-xs-min
)
{
padding-right
:
0
;;
}
}
}
}
.page-sidebar-expanded
{
.page-sidebar-expanded
{
padding-left
:
$sidebar_collapsed_width
;
padding-left
:
$sidebar_width
;
@media
(
min-width
:
$screen-md-min
)
{
padding-left
:
$sidebar_width
;
}
@media
(
max-width
:
$screen-xs-min
)
{
@media
(
max-width
:
$screen-xs-min
)
{
padding-left
:
0
;
padding-left
:
0
;
...
...
app/assets/stylesheets/framework/variables.scss
View file @
7c501895
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Layout
* Layout
*/
*/
$sidebar_collapsed_width
:
62px
;
$sidebar_collapsed_width
:
62px
;
$sidebar_width
:
22
0px
;
$sidebar_width
:
9
0px
;
$gutter_collapsed_width
:
62px
;
$gutter_collapsed_width
:
62px
;
$gutter_width
:
290px
;
$gutter_width
:
290px
;
$gutter_inner_width
:
258px
;
$gutter_inner_width
:
258px
;
...
...
app/views/layouts/_page.html.haml
View file @
7c501895
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.header-logo
=
link_to
root_path
,
class:
'gitlab-text-container-link'
,
title:
'Dashboard'
,
id:
'js-shortcuts-home'
do
%a
#logo
.header-logo
=
brand_header_logo
#logo
=
link_to
root_path
,
class:
'gitlab-text-container-link'
,
title:
'Dashboard'
,
id:
'js-shortcuts-home'
do
=
brand_header_logo
.gitlab-text-container
%h3
GitLab
-
if
defined?
(
sidebar
)
&&
sidebar
-
if
defined?
(
sidebar
)
&&
sidebar
=
render
"layouts/nav/
#{
sidebar
}
"
=
render
"layouts/nav/
#{
sidebar
}
"
...
@@ -18,9 +16,7 @@
...
@@ -18,9 +16,7 @@
=
render
partial:
'layouts/collapse_button'
=
render
partial:
'layouts/collapse_button'
-
if
current_user
-
if
current_user
=
link_to
current_user
,
class:
'sidebar-user'
,
title:
"Profile"
do
=
link_to
current_user
,
class:
'sidebar-user'
,
title:
"Profile"
do
=
image_tag
avatar_icon
(
current_user
,
60
),
alt:
'Profile'
,
class:
'avatar avatar s36'
=
image_tag
avatar_icon
(
current_user
,
60
),
alt:
'Profile'
,
class:
'avatar avatar s46'
.username
=
current_user
.
username
-
if
defined?
(
nav
)
&&
nav
-
if
defined?
(
nav
)
&&
nav
.layout-nav
.layout-nav
.container-fluid
.container-fluid
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
7c501895
...
@@ -2,54 +2,50 @@
...
@@ -2,54 +2,50 @@
=
nav_link
(
path:
[
'root#index'
,
'projects#trending'
,
'projects#starred'
,
'dashboard/projects#index'
],
html_options:
{
class:
"
#{
project_tab_class
}
home"
})
do
=
nav_link
(
path:
[
'root#index'
,
'projects#trending'
,
'projects#starred'
,
'dashboard/projects#index'
],
html_options:
{
class:
"
#{
project_tab_class
}
home"
})
do
=
link_to
dashboard_projects_path
,
title:
'Projects'
,
class:
'dashboard-shortcuts-projects'
do
=
link_to
dashboard_projects_path
,
title:
'Projects'
,
class:
'dashboard-shortcuts-projects'
do
=
icon
(
'bookmark fw'
)
=
icon
(
'bookmark fw'
)
%
span
%
div
Projects
Projects
=
nav_link
(
controller: :todos
)
do
=
nav_link
(
controller: :todos
)
do
=
link_to
dashboard_todos_path
,
title:
'Todos'
do
=
link_to
dashboard_todos_path
,
title:
'Todos'
do
=
icon
(
'bell fw'
)
=
icon
(
'bell fw'
)
%
span
%
div
Todos
Todos
%span
.count.todos-pending-count
=
number_with_delimiter
(
todos_pending_count
)
=
nav_link
(
path:
'dashboard#activity'
)
do
=
nav_link
(
path:
'dashboard#activity'
)
do
=
link_to
activity_dashboard_path
,
class:
'dashboard-shortcuts-activity'
,
title:
'Activity'
do
=
link_to
activity_dashboard_path
,
class:
'dashboard-shortcuts-activity'
,
title:
'Activity'
do
=
icon
(
'dashboard fw'
)
=
icon
(
'dashboard fw'
)
%
span
%
div
Activity
Activity
=
nav_link
(
controller:
[
:groups
,
'groups/milestones'
,
'groups/group_members'
])
do
=
nav_link
(
controller:
[
:groups
,
'groups/milestones'
,
'groups/group_members'
])
do
=
link_to
dashboard_groups_path
,
title:
'Groups'
do
=
link_to
dashboard_groups_path
,
title:
'Groups'
do
=
icon
(
'group fw'
)
=
icon
(
'group fw'
)
%
span
%
div
Groups
Groups
=
nav_link
(
controller:
'dashboard/milestones'
)
do
=
nav_link
(
controller:
'dashboard/milestones'
)
do
=
link_to
dashboard_milestones_path
,
title:
'Milestones'
do
=
link_to
dashboard_milestones_path
,
title:
'Milestones'
do
=
icon
(
'clock-o fw'
)
=
icon
(
'clock-o fw'
)
%
span
%
div
Milestones
Milestones
=
nav_link
(
path:
'dashboard#issues'
)
do
=
nav_link
(
path:
'dashboard#issues'
)
do
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'dashboard-shortcuts-issues'
do
=
link_to
assigned_issues_dashboard_path
,
title:
'Issues'
,
class:
'dashboard-shortcuts-issues'
do
=
icon
(
'exclamation-circle fw'
)
=
icon
(
'exclamation-circle fw'
)
%
span
%
div
Issues
Issues
%span
.count
=
number_with_delimiter
(
current_user
.
assigned_open_issues_count
)
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'dashboard-shortcuts-merge_requests'
do
=
link_to
assigned_mrs_dashboard_path
,
title:
'Merge Requests'
,
class:
'dashboard-shortcuts-merge_requests'
do
=
icon
(
'tasks fw'
)
=
icon
(
'tasks fw'
)
%
span
%
div
Merge Requests
Merge Requests
%span
.count
=
number_with_delimiter
(
current_user
.
assigned_open_merge_request_count
)
=
nav_link
(
controller: :snippets
)
do
=
nav_link
(
controller: :snippets
)
do
=
link_to
dashboard_snippets_path
,
title:
'Snippets'
do
=
link_to
dashboard_snippets_path
,
title:
'Snippets'
do
=
icon
(
'clipboard fw'
)
=
icon
(
'clipboard fw'
)
%
span
%
div
Snippets
Snippets
=
nav_link
(
controller: :help
)
do
=
nav_link
(
controller: :help
)
do
=
link_to
help_path
,
title:
'Help'
do
=
link_to
help_path
,
title:
'Help'
do
=
icon
(
'question-circle fw'
)
=
icon
(
'question-circle fw'
)
%
span
%
div
Help
Help
=
nav_link
(
html_options:
{
class:
profile_tab_class
})
do
=
nav_link
(
html_options:
{
class:
profile_tab_class
})
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'
)
%
span
%
div
Profile Settings
Profile Settings
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