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
a3713050
Commit
a3713050
authored
Feb 23, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ability to toggle sidebar on smaller screens
parent
c684bcc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
20 deletions
+12
-20
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+3
-7
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+7
-3
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+2
-10
No files found.
app/assets/javascripts/application.js.coffee
View file @
a3713050
...
@@ -188,13 +188,9 @@ $ ->
...
@@ -188,13 +188,9 @@ $ ->
$container
.
remove
()
$container
.
remove
()
$
(
'.navbar-toggle'
).
on
'click'
,
->
$
(
'.navbar-toggle'
).
on
'click'
,
->
$this
=
$
(
this
);
$
(
'.header-content .title'
).
toggle
()
$
(
'.header-content .title'
).
toggle
()
$
(
'.header-content .navbar-collapse'
).
toggle
()
$
(
'.header-content .navbar-collapse'
).
toggle
()
if
$this
.
toggleClass
(
'active'
).
hasClass
(
'active'
)
$
(
'.navbar-toggle'
).
toggleClass
(
'active'
)
$this
.
closest
(
'header'
).
css
(
'z-index'
,
100
)
else
$this
.
closest
(
'header'
).
css
(
'z-index'
,
99
)
# Show/hide comments on diff
# Show/hide comments on diff
$
(
"body"
).
on
"click"
,
".js-toggle-diff-comments"
,
(
e
)
->
$
(
"body"
).
on
"click"
,
".js-toggle-diff-comments"
,
(
e
)
->
...
@@ -214,7 +210,7 @@ $ ->
...
@@ -214,7 +210,7 @@ $ ->
$this
=
$
(
this
)
$this
=
$
(
this
)
$this
.
attr
'value'
,
$this
.
val
()
$this
.
attr
'value'
,
$this
.
val
()
return
return
$
(
document
)
$
(
document
)
.
off
'keyup'
,
'input[type="search"]'
.
off
'keyup'
,
'input[type="search"]'
.
on
'keyup'
,
'input[type="search"]'
,
(
e
)
->
.
on
'keyup'
,
'input[type="search"]'
,
(
e
)
->
...
@@ -257,7 +253,7 @@ $ ->
...
@@ -257,7 +253,7 @@ $ ->
$
(
'.page-with-sidebar'
)
$
(
'.page-with-sidebar'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-expanded'
)
$
.
cookie
(
"collapsed_gutter"
,
$
.
cookie
(
"collapsed_gutter"
,
$
(
'.right-sidebar'
)
$
(
'.right-sidebar'
)
.
hasClass
(
'right-sidebar-collapsed'
),
{
path
:
'/'
})
.
hasClass
(
'right-sidebar-collapsed'
),
{
path
:
'/'
})
...
...
app/assets/stylesheets/framework/header.scss
View file @
a3713050
...
@@ -23,7 +23,7 @@ header {
...
@@ -23,7 +23,7 @@ header {
&
.navbar-gitlab
{
&
.navbar-gitlab
{
padding
:
0
20px
;
padding
:
0
20px
;
z-index
:
99
;
z-index
:
100
;
margin-bottom
:
0
;
margin-bottom
:
0
;
min-height
:
$header-height
;
min-height
:
$header-height
;
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -141,9 +141,13 @@ header {
...
@@ -141,9 +141,13 @@ header {
}
}
@media
(
max-width
:
$screen-md-max
)
{
@media
(
max-width
:
$screen-md-max
)
{
.header-collapsed
,
.header-expanded
{
.header-collapsed
{
@include
collapsed-header
;
margin-left
:
$sidebar_collapsed_width
;
}
}
.header-expanded
{
margin-left
:
$sidebar_width
;
}
}
}
@media
(
min-width
:
$screen-md-max
)
{
@media
(
min-width
:
$screen-md-max
)
{
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
a3713050
...
@@ -183,20 +183,12 @@
...
@@ -183,20 +183,12 @@
}
}
@mixin
expanded-sidebar
{
@mixin
expanded-sidebar
{
padding-left
:
$sidebar_width
;
&
.right-sidebar-collapsed
{
&
.right-sidebar-collapsed
{
padding-right
:
$sidebar_collapsed_width
;
padding-right
:
$sidebar_collapsed_width
;
}
}
// when the screen is small enough
@media
(
max-width
:
$screen-md-max
)
{
padding-left
:
$sidebar_collapsed_width
;
}
// when the screen is big enough
@media
(
min-width
:
$screen-md-max
)
{
padding-left
:
$sidebar_width
;
}
.sidebar-wrapper
{
.sidebar-wrapper
{
width
:
$sidebar_width
;
width
:
$sidebar_width
;
...
...
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