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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a1fbdbb6
Commit
a1fbdbb6
authored
Jun 09, 2016
by
Annabel Dunstone
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move tanuki icon to center of nav bar; keep nav closed by default; remove collapsed nav cookie
parent
8f3c0490
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
36 deletions
+44
-36
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+1
-6
app/assets/javascripts/sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+0
-9
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+18
-0
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+1
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+15
-12
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
+3
-4
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+5
-1
No files found.
app/assets/javascripts/application.js.coffee
View file @
a1fbdbb6
...
@@ -241,7 +241,6 @@ $ ->
...
@@ -241,7 +241,6 @@ $ ->
$this
.
attr
'value'
,
$this
.
val
()
$this
.
attr
'value'
,
$this
.
val
()
$sidebarGutterToggle
=
$
(
'.js-sidebar-toggle'
)
$sidebarGutterToggle
=
$
(
'.js-sidebar-toggle'
)
$navIconToggle
=
$
(
'.toggle-nav-collapse'
)
$
(
document
)
$
(
document
)
.
off
'breakpoint:change'
.
off
'breakpoint:change'
...
@@ -251,10 +250,6 @@ $ ->
...
@@ -251,10 +250,6 @@ $ ->
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$sidebarGutterToggle
.
trigger
(
'click'
)
$sidebarGutterToggle
.
trigger
(
'click'
)
$navIcon
=
$navIconToggle
.
find
(
'.fa'
)
if
$navIcon
.
hasClass
(
'fa-angle-left'
)
$navIconToggle
.
trigger
(
'click'
)
fitSidebarForSize
=
->
fitSidebarForSize
=
->
oldBootstrapBreakpoint
=
bootstrapBreakpoint
oldBootstrapBreakpoint
=
bootstrapBreakpoint
bootstrapBreakpoint
=
bp
.
getBreakpointSize
()
bootstrapBreakpoint
=
bp
.
getBreakpointSize
()
...
@@ -263,7 +258,7 @@ $ ->
...
@@ -263,7 +258,7 @@ $ ->
checkInitialSidebarSize
=
->
checkInitialSidebarSize
=
->
bootstrapBreakpoint
=
bp
.
getBreakpointSize
()
bootstrapBreakpoint
=
bp
.
getBreakpointSize
()
if
bootstrapBreakpoint
is
"xs"
or
"sm"
if
bootstrapBreakpoint
is
"xs"
$
(
document
).
trigger
(
'breakpoint:change'
,
[
bootstrapBreakpoint
])
$
(
document
).
trigger
(
'breakpoint:change'
,
[
bootstrapBreakpoint
])
$
(
window
)
$
(
window
)
...
...
app/assets/javascripts/sidebar.js.coffee
View file @
a1fbdbb6
...
@@ -4,8 +4,6 @@ expanded = 'page-sidebar-expanded'
...
@@ -4,8 +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
:
'/'
})
setTimeout
(
->
setTimeout
(
->
niceScrollBars
=
$
(
'.nicescroll'
).
niceScroll
();
niceScrollBars
=
$
(
'.nicescroll'
).
niceScroll
();
...
@@ -17,10 +15,3 @@ $(document).on("click", '.toggle-nav-collapse, .side-nav-toggle', (e) ->
...
@@ -17,10 +15,3 @@ $(document).on("click", '.toggle-nav-collapse, .side-nav-toggle', (e) ->
toggleSidebar
()
toggleSidebar
()
)
)
$
->
size
=
bp
.
getBreakpointSize
()
if
size
is
"xs"
or
size
is
"sm"
if
$
(
'.page-with-sidebar'
).
hasClass
(
expanded
)
toggleSidebar
()
app/assets/stylesheets/framework/header.scss
View file @
a1fbdbb6
...
@@ -122,9 +122,18 @@ header {
...
@@ -122,9 +122,18 @@ header {
margin-top
:
-5px
;
margin-top
:
-5px
;
}
}
.header-logo
{
position
:
absolute
;
left
:
50%
;
margin-left
:
-18px
;
top
:
7px
;
}
.title
{
.title
{
margin
:
0
;
margin
:
0
;
font-size
:
19px
;
font-size
:
19px
;
max-width
:
250px
;
display
:
inline-block
;
line-height
:
$header-height
;
line-height
:
$header-height
;
font-weight
:
normal
;
font-weight
:
normal
;
color
:
$gl-text-color
;
color
:
$gl-text-color
;
...
@@ -190,6 +199,15 @@ header {
...
@@ -190,6 +199,15 @@ header {
}
}
}
}
.tanuki-shape
{
transition
:
all
0
.8s
;
&
:hover
,
&
.highlight
{
fill
:
rgb
(
255
,
255
,
255
);
transition
:
all
0
.1s
;
}
}
@media
(
max-width
:
$screen-xs-max
)
{
@media
(
max-width
:
$screen-xs-max
)
{
header
.container-fluid
{
header
.container-fluid
{
font-size
:
18px
;
font-size
:
18px
;
...
...
app/assets/stylesheets/framework/nav.scss
View file @
a1fbdbb6
@mixin
fade
(
$gradient-direction
,
$rgba
,
$gradient-color
)
{
@mixin
fade
(
$gradient-direction
,
$rgba
,
$gradient-color
)
{
visibility
:
visible
;
visibility
:
visible
;
opacity
:
1
;
opacity
:
1
;
z-index
:
2
;
position
:
absolute
;
position
:
absolute
;
bottom
:
12px
;
bottom
:
12px
;
width
:
43px
;
width
:
43px
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
a1fbdbb6
...
@@ -66,19 +66,8 @@
...
@@ -66,19 +66,8 @@
}
}
}
}
.tanuki-shape
{
transition
:
all
0
.8s
;
&
:hover
,
&
.highlight
{
fill
:
rgb
(
255
,
255
,
255
);
transition
:
all
0
.1s
;
}
}
.nav-sidebar
{
.nav-sidebar
{
margin-top
:
22
+
$header-height
;
margin-top
:
22
px
;
margin-bottom
:
116px
;
margin-bottom
:
116px
;
transition-duration
:
.3s
;
transition-duration
:
.3s
;
list-style
:
none
;
list-style
:
none
;
...
@@ -217,6 +206,20 @@
...
@@ -217,6 +206,20 @@
}
}
}
}
.gitlab-text-container
{
height
:
50px
;
padding
:
5px
;
text-align
:
center
;
h3
{
color
:
white
;
margin
:
0
;
font-size
:
19px
;
line-height
:
41px
;
font-weight
:
normal
;
}
}
.page-sidebar-expanded
{
.page-sidebar-expanded
{
padding-left
:
$sidebar_width
;
padding-left
:
$sidebar_width
;
...
...
app/views/layouts/_collapse_button.html.haml
View file @
a1fbdbb6
-
if
nav_menu_collapsed?
=
link_to
icon
(
'angle-left'
),
'#'
,
class:
'toggle-nav-collapse'
,
title:
"Open/Close"
=
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 @
a1fbdbb6
.page-with-sidebar
{
class:
"#{page_sidebar_class}
#{page_gutter_class}"
}
.page-with-sidebar
.page-sidebar-collapsed
{
class:
"
#{page_gutter_class}"
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
=
link_to
root_path
,
class:
'gitlab-text-container-link'
,
title:
'Dashboard'
,
id:
'js-shortcuts-home'
do
=
link_to
root_path
,
class:
'gitlab-text-container-link'
,
title:
'Dashboard'
,
id:
'js-shortcuts-home'
do
.header-logo
.gitlab-text-container
#logo
%h3
GitLab
=
brand_header_logo
-
if
defined?
(
sidebar
)
&&
sidebar
-
if
defined?
(
sidebar
)
&&
sidebar
=
render
"layouts/nav/
#{
sidebar
}
"
=
render
"layouts/nav/
#{
sidebar
}
"
...
...
app/views/layouts/header/_default.html.haml
View file @
a1fbdbb6
%header
.navbar.navbar-fixed-top.navbar-gitlab
{
class:
nav_header_class
}
%header
.navbar.navbar-fixed-top.navbar-gitlab
.header-collapsed
%div
{
class:
fluid_layout
?
"container-fluid"
:
"container-fluid"
}
%div
{
class:
fluid_layout
?
"container-fluid"
:
"container-fluid"
}
.header-content
.header-content
%button
.side-nav-toggle
{
type:
'button'
}
%button
.side-nav-toggle
{
type:
'button'
}
...
@@ -50,6 +50,10 @@
...
@@ -50,6 +50,10 @@
%h1
.title
=
title
%h1
.title
=
title
.header-logo
#logo
=
brand_header_logo
=
yield
:header_content
=
yield
:header_content
=
render
'shared/outdated_browser'
=
render
'shared/outdated_browser'
...
...
Alain Takoudjou
@alain.takoudjou
mentioned in commit
32c53d6d
·
May 03, 2017
mentioned in commit
32c53d6d
mentioned in commit 32c53d6d1b71885acbcab7829e197744a357c9fc
Toggle commit list
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