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
iv
gitlab-ce
Commits
2d7183bb
Commit
2d7183bb
authored
Mar 21, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing tests
Moved the scss out of a mixin as it was really confusing the hell out of the CSS
parent
e94482d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
75 deletions
+60
-75
app/assets/javascripts/sidebar.js.coffee
app/assets/javascripts/sidebar.js.coffee
+0
-1
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+60
-74
No files found.
app/assets/javascripts/sidebar.js.coffee
View file @
2d7183bb
...
@@ -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"
)
$
(
'.sidebar-wrapper'
).
toggleClass
(
"sidebar-collapsed sidebar-expanded"
)
$
(
'.toggle-nav-collapse i'
).
toggleClass
(
"fa-angle-right fa-angle-left"
)
$
(
'.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
:
'/'
})
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
2d7183bb
#logo
{
z-index
:
2
;
position
:
absolute
;
width
:
58px
;
cursor
:
pointer
;
}
.page-with-sidebar
{
.page-with-sidebar
{
padding-top
:
$header-height
;
padding-top
:
$header-height
;
transition-duration
:
.3s
;
transition-duration
:
.3s
;
...
@@ -18,25 +25,6 @@
...
@@ -18,25 +25,6 @@
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
}
}
#logo
{
z-index
:
2
;
position
:
absolute
;
width
:
58px
;
cursor
:
pointer
;
}
&
.right-sidebar-expanded
{
padding-right
:
0
;
@media
(
min-width
:
$screen-sm-min
)
and
(
max-width
:
$screen-sm-max
)
{
padding-right
:
$sidebar_collapsed_width
;
}
@media
(
min-width
:
$screen-md-min
)
{
padding-right
:
$gutter_width
;
}
}
}
}
.sidebar-wrapper
{
.sidebar-wrapper
{
...
@@ -203,43 +191,28 @@
...
@@ -203,43 +191,28 @@
}
}
}
}
@mixin
expanded-sidebar
{
.collapse-nav
a
{
padding-left
:
$sidebar_collapsed_width
;
width
:
$sidebar_width
;
position
:
fixed
;
@media
(
min-width
:
$screen-md-min
)
{
bottom
:
0
;
padding-left
:
$sidebar_width
;
left
:
0
;
}
font-size
:
13px
;
background
:
transparent
;
.sidebar-wrapper
{
height
:
40px
;
width
:
$sidebar_width
;
text-align
:
center
;
line-height
:
40px
;
.nav-sidebar
{
transition-duration
:
.3s
;
width
:
$sidebar_width
;
outline
:
none
;
}
}
.nav-sidebar
li
a
{
width
:
230px
;
&
.back-link
{
.collapse-nav
a
:hover
{
i
{
text-decoration
:
none
;
opacity
:
0
;
background
:
#f2f6f7
;
}
}
}
}
}
}
@mixin
collapsed-sidebar
{
.page-sidebar-collapsed
{
padding-left
:
$sidebar_collapsed_width
;
padding-left
:
$sidebar_collapsed_width
;
&
.right-sidebar-collapsed
{
padding-right
:
0
;
@media
(
min-width
:
$screen-sm-min
)
{
padding-right
:
$sidebar_collapsed_width
;
}
}
.sidebar-wrapper
{
.sidebar-wrapper
{
width
:
$sidebar_collapsed_width
;
width
:
$sidebar_collapsed_width
;
...
@@ -284,35 +257,48 @@
...
@@ -284,35 +257,48 @@
}
}
}
}
.collapse-nav
a
{
.page-sidebar-expanded
{
width
:
$sidebar_width
;
padding-left
:
$sidebar_collapsed_width
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
font-size
:
13px
;
background
:
transparent
;
height
:
40px
;
text-align
:
center
;
line-height
:
40px
;
transition-duration
:
.3s
;
outline
:
none
;
}
.collapse-nav
a
:hover
{
@media
(
min-width
:
$screen-md-min
)
{
text-decoration
:
none
;
padding-left
:
$sidebar_width
;
background
:
#f2f6f7
;
}
.sidebar-wrapper
{
width
:
$sidebar_width
;
.nav-sidebar
{
width
:
$sidebar_width
;
}
.nav-sidebar
li
a
{
width
:
230px
;
&
.back-link
{
i
{
opacity
:
0
;
}
}
}
}
}
}
.page-sidebar-collapsed
{
.right-sidebar-collapsed
{
/* Extra small devices (phones, less than 768px) */
@include
collapsed-sidebar
;
padding-right
:
0
;
padding-right
:
0
;
/* Small devices (tablets, 768px and up) */
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
@include
collapsed-sidebar
;
padding-right
:
$sidebar_collapsed_width
;
}
}
}
}
.page-sidebar-expanded
{
.right-sidebar-expanded
{
@include
expanded-sidebar
;
padding-right
:
0
;
@media
(
min-width
:
$screen-sm-min
)
and
(
max-width
:
$screen-sm-max
)
{
padding-right
:
$sidebar_collapsed_width
;
}
@media
(
min-width
:
$screen-md-min
)
{
padding-right
:
$gutter_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