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
Jérome Perrin
gitlab-ce
Commits
03f2dd90
Commit
03f2dd90
authored
Apr 01, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide sidebar completely when collapsed
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
dbc96f05
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
52 deletions
+27
-52
app/assets/javascripts/sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+0
-1
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+2
-2
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+22
-44
app/views/layouts/_collapse_button.html.haml
app/views/layouts/_collapse_button.html.haml
+0
-4
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+3
-1
No files found.
app/assets/javascripts/sidebar.js.coffee
View file @
03f2dd90
...
@@ -4,7 +4,6 @@ expanded = 'page-sidebar-expanded'
...
@@ -4,7 +4,6 @@ expanded = 'page-sidebar-expanded'
toggleSidebar
=
->
toggleSidebar
=
->
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
expanded
}
"
)
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
expanded
}
"
)
$
(
'header'
).
toggleClass
(
"header-collapsed header-expanded"
)
$
(
'header'
).
toggleClass
(
"header-collapsed header-expanded"
)
$
(
'.toggle-nav-collapse i'
).
toggleClass
(
"fa-angle-right fa-angle-left"
)
$
.
cookie
(
"collapsed_nav"
,
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
),
{
path
:
'/'
})
$
.
cookie
(
"collapsed_nav"
,
$
(
'.page-with-sidebar'
).
hasClass
(
collapsed
),
{
path
:
'/'
})
setTimeout
(
->
setTimeout
(
->
...
...
app/assets/stylesheets/framework/header.scss
View file @
03f2dd90
...
@@ -123,11 +123,11 @@ header {
...
@@ -123,11 +123,11 @@ header {
}
}
@mixin
collapsed-header
{
@mixin
collapsed-header
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
40px
;
}
}
.header-collapsed
{
.header-collapsed
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
40px
;
@media
(
min-width
:
$screen-md-min
)
{
@media
(
min-width
:
$screen-md-min
)
{
@include
collapsed-header
;
@include
collapsed-header
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
03f2dd90
...
@@ -191,6 +191,27 @@
...
@@ -191,6 +191,27 @@
}
}
}
}
.expand-nav
a
{
color
:
$gl-icon-color
;
width
:
60px
;
position
:
fixed
;
top
:
0
;
left
:
0
;
font-size
:
20px
;
background
:
transparent
;
height
:
59px
;
text-align
:
center
;
line-height
:
59px
;
border-bottom
:
1px
solid
#eee
;
transition-duration
:
.3s
;
outline
:
none
;
z-index
:
100
;
&
:hover
{
text-decoration
:
none
;
}
}
.collapse-nav
a
{
.collapse-nav
a
{
width
:
$sidebar_width
;
width
:
$sidebar_width
;
position
:
fixed
;
position
:
fixed
;
...
@@ -210,55 +231,12 @@
...
@@ -210,55 +231,12 @@
}
}
.page-sidebar-collapsed
{
.page-sidebar-collapsed
{
padding-left
:
$sidebar_collapsed_width
;
.sidebar-wrapper
{
.sidebar-wrapper
{
width
:
$sidebar_collapsed_width
;
display
:
none
;
.header-logo
{
width
:
$sidebar_collapsed_width
;
a
{
padding-left
:
(
$sidebar_collapsed_width
-
36
)
/
2
;
.gitlab-text-container
{
display
:
none
;
}
}
}
.nav-sidebar
{
width
:
$sidebar_collapsed_width
;
li
{
width
:
auto
;
a
{
span
{
display
:
none
;
}
}
}
}
.collapse-nav
a
{
width
:
$sidebar_collapsed_width
;
}
.sidebar-user
{
padding-left
:
(
$sidebar_collapsed_width
-
36
)
/
2
;
width
:
$sidebar_collapsed_width
;
.username
{
display
:
none
;
}
}
}
}
}
}
.page-sidebar-expanded
{
.page-sidebar-expanded
{
padding-left
:
$sidebar_collapsed_width
;
@media
(
min-width
:
$screen-md-min
)
{
@media
(
min-width
:
$screen-md-min
)
{
padding-left
:
$sidebar_width
;
padding-left
:
$sidebar_width
;
}
}
...
...
app/views/layouts/_collapse_button.html.haml
deleted
100644 → 0
View file @
dbc96f05
-
if
nav_menu_collapsed?
=
link_to
icon
(
'angle-right'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
-
else
=
link_to
icon
(
'angle-left'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
app/views/layouts/_page.html.haml
View file @
03f2dd90
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
=
render
"layouts/broadcast"
=
render
"layouts/broadcast"
.expand-nav
=
link_to
icon
(
'bars'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.header-logo
.header-logo
%a
#logo
%a
#logo
...
@@ -20,7 +22,7 @@
...
@@ -20,7 +22,7 @@
=
render
"layouts/nav/
#{
primary_sidebar
}
"
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.collapse-nav
.collapse-nav
=
render
partial:
'layouts/collapse_button'
=
link_to
icon
(
'angle-left'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
-
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 s36'
...
...
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