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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
78866921
Commit
78866921
authored
Jun 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved pinned button to the bottom
Changed breakpoint width to 1440px
parent
7d9157ff
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
21 deletions
+36
-21
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+1
-1
app/assets/stylesheets/framework/gitlab-theme.scss
app/assets/stylesheets/framework/gitlab-theme.scss
+6
-1
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+23
-13
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-0
app/views/layouts/_collapse_button.html.haml
app/views/layouts/_collapse_button.html.haml
+1
-4
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+4
-2
No files found.
app/assets/javascripts/application.js.coffee
View file @
78866921
...
...
@@ -259,7 +259,7 @@ $ ->
new
Aside
()
# Sidenav pinning
if
bootstrapBreakpoint
isnt
'lg'
and
$
.
cookie
(
'pin_nav'
)
is
'true'
if
$
(
window
).
width
()
<
1440
and
$
.
cookie
(
'pin_nav'
)
is
'true'
$
.
cookie
(
'pin_nav'
,
'false'
)
$
(
'.page-with-sidebar'
)
.
toggleClass
(
'page-sidebar-collapsed page-sidebar-expanded'
)
...
...
app/assets/stylesheets/framework/gitlab-theme.scss
View file @
78866921
...
...
@@ -8,9 +8,14 @@
*/
@mixin
gitlab-theme
(
$color-light
,
$color
,
$color-darker
,
$color-dark
)
{
.page-with-sidebar
{
.collapse-nav
{
.toggle-nav-collapse
,
.pin-nav-btn
{
color
:
$color-light
;
background
:
$color
;
&
:hover
{
color
:
$white-light
;
}
}
.sidebar-wrapper
{
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
78866921
...
...
@@ -49,6 +49,10 @@
font-size
:
16px
;
line-height
:
36px
;
transition
:
width
$sidebar-transition-duration
,
padding
$sidebar-transition-duration
;
@media
(
min-width
:
$sidebar-breakpoint
)
{
bottom
:
50px
;
}
}
...
...
@@ -70,6 +74,10 @@
overflow-y
:
auto
;
overflow-x
:
hidden
;
@media
(
min-width
:
$sidebar-breakpoint
)
{
bottom
:
115px
;
}
&
.navbar-collapse
{
padding
:
0
!
important
;
}
...
...
@@ -120,15 +128,15 @@
}
}
.
collapse-nav
{
width
:
100%
;
.
toggle-nav-collapse
{
width
:
$sidebar_width
;
position
:
absolute
;
top
:
0
;
left
:
0
;
min-height
:
50px
;
padding
:
5px
0
;
font-size
:
18px
;
background
:
transparent
;
line-height
:
30px
;
}
.nav-header-btn
{
...
...
@@ -143,16 +151,18 @@
}
}
.toggle-nav-collapse
{
position
:
relative
;
left
:
10px
;
line-height
:
40px
;
}
.pin-nav-btn
{
display
:
none
;
position
:
absolute
;
right
:
10px
;
top
:
2px
;
left
:
0
;
bottom
:
0
;
height
:
50px
;
width
:
$sidebar_width
;
line-height
:
30px
;
@media
(
min-width
:
$sidebar-breakpoint
)
{
display
:
block
;
}
.fa
{
transition
:
transform
.15s
;
...
...
@@ -182,14 +192,14 @@
.page-sidebar-pinned
{
.content-wrapper
,
.layout-nav
{
@media
(
min-width
:
$s
creen-lg-min
)
{
@media
(
min-width
:
$s
idebar-breakpoint
)
{
padding-left
:
$sidebar_width
;
}
}
}
header
.header-pinned-nav
{
@media
(
min-width
:
$s
creen-lg-min
)
{
@media
(
min-width
:
$s
idebar-breakpoint
)
{
padding-left
:
(
$sidebar_width
+
$gl-padding
);
.side-nav-toggle
{
...
...
app/assets/stylesheets/framework/variables.scss
View file @
78866921
...
...
@@ -7,6 +7,7 @@ $gutter_collapsed_width: 62px;
$gutter_width
:
290px
;
$gutter_inner_width
:
258px
;
$sidebar-transition-duration
:
.15s
;
$sidebar-breakpoint
:
1440px
;
/*
* UI elements
...
...
app/views/layouts/_collapse_button.html.haml
View file @
78866921
=
link_to
'#'
,
class:
'nav-header-btn toggle-nav-collapse'
,
title:
"Open/Close"
do
=
link_to
'#'
,
class:
'nav-header-btn t
ext-center t
oggle-nav-collapse'
,
title:
"Open/Close"
do
%span
.sr-only
Toggle navigation
=
icon
(
'bars'
)
=
link_to
'#'
,
class:
"nav-header-btn pin-nav-btn
#{
'is-active'
if
pinned_nav?
}
visible-lg-block js-nav-pin"
,
title:
'Pin/Unpin navigation'
do
%span
.sr-only
Toggle navigation pinning
=
icon
(
'thumb-tack'
)
app/views/layouts/_page.html.haml
View file @
78866921
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
%header
.collapse-nav
=
render
partial:
'layouts/collapse_button'
-
if
defined?
(
sidebar
)
&&
sidebar
=
render
"layouts/nav/
#{
sidebar
}
"
...
...
@@ -14,6 +13,9 @@
=
image_tag
avatar_icon
(
current_user
,
60
),
alt:
'Profile'
,
class:
'avatar avatar s36'
.username
=
current_user
.
username
=
link_to
'#'
,
class:
"nav-header-btn text-center pin-nav-btn
#{
'is-active'
if
pinned_nav?
}
js-nav-pin"
,
title:
'Pin/Unpin navigation'
do
%span
.sr-only
Toggle navigation pinning
=
icon
(
'thumb-tack'
)
-
if
defined?
(
nav
)
&&
nav
.layout-nav
.container-fluid
...
...
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