BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
03f2dd90
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
52 deletions
+27
-52
sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+0
-1
header.scss
app/assets/stylesheets/framework/header.scss
+2
-2
sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+22
-44
_collapse_button.html.haml
app/views/layouts/_collapse_button.html.haml
+0
-4
_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'
toggleSidebar
=
->
$
(
'.page-with-sidebar'
).
toggleClass
(
"
#{
collapsed
}
#{
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
:
'/'
})
setTimeout
(
->
...
...
app/assets/stylesheets/framework/header.scss
View file @
03f2dd90
...
...
@@ -123,11 +123,11 @@ header {
}
@mixin
collapsed-header
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
40px
;
}
.header-collapsed
{
margin-left
:
$sidebar_collapsed_width
;
margin-left
:
40px
;
@media
(
min-width
:
$screen-md-min
)
{
@include
collapsed-header
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
03f2dd90
...
...
@@ -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
{
width
:
$sidebar_width
;
position
:
fixed
;
...
...
@@ -210,55 +231,12 @@
}
.page-sidebar-collapsed
{
padding-left
:
$sidebar_collapsed_width
;
.sidebar-wrapper
{
width
:
$sidebar_collapsed_width
;
.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
;
}
}
display
:
none
;
}
}
.page-sidebar-expanded
{
padding-left
:
$sidebar_collapsed_width
;
@media
(
min-width
:
$screen-md-min
)
{
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}"
}
=
render
"layouts/broadcast"
.expand-nav
=
link_to
icon
(
'bars'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.header-logo
%a
#logo
...
...
@@ -20,7 +22,7 @@
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.collapse-nav
=
render
partial:
'layouts/collapse_button'
=
link_to
icon
(
'angle-left'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
-
if
current_user
=
link_to
current_user
,
class:
'sidebar-user'
,
title:
"Profile"
do
=
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