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
Tatuya Kamada
gitlab-ce
Commits
a510fe11
Commit
a510fe11
authored
Sep 02, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove superfluous "collapsed" class and rename header classes for clarity
parent
b2f8ebbb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
34 deletions
+8
-34
app/assets/javascripts/sidebar.js.es6
app/assets/javascripts/sidebar.js.es6
+4
-8
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+0
-4
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+3
-11
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+0
-6
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+1
-5
No files found.
app/assets/javascripts/sidebar.js.es6
View file @
a510fe11
...
...
@@ -14,11 +14,9 @@
const pinnedPageClass = 'page-sidebar-pinned';
const expandedPageClass = 'page-sidebar-expanded';
const collapsedPageClass = 'page-sidebar-collapsed';
const pinnedNavbarClass = 'header-pinned-nav';
const expandedNavbarClass = 'header-expanded';
const collapsedNavbarClass = 'header-collapsed';
const pinnedNavbarClass = 'header-sidebar-pinned';
const expandedNavbarClass = 'header-sidebar-expanded';
class Sidebar {
constructor() {
...
...
@@ -75,12 +73,10 @@
renderState() {
$(pageSelector)
.toggleClass(pinnedPageClass, this.isPinned && this.isExpanded)
.toggleClass(expandedPageClass, this.isExpanded)
.toggleClass(collapsedPageClass, !this.isExpanded);
.toggleClass(expandedPageClass, this.isExpanded);
$(navbarSelector)
.toggleClass(pinnedNavbarClass, this.isPinned && this.isExpanded)
.toggleClass(expandedNavbarClass, this.isExpanded)
.toggleClass(collapsedNavbarClass, !this.isExpanded);
.toggleClass(expandedNavbarClass, this.isExpanded);
const $pinnedToggle = $(pinnedToggleSelector);
const tooltipText = this.isPinned ? 'Unpin navigation' : 'Pin navigation';
...
...
app/assets/stylesheets/framework/header.scss
View file @
a510fe11
...
...
@@ -77,10 +77,6 @@ header {
}
}
&
.header-collapsed
{
padding
:
0
16px
;
}
.side-nav-toggle
{
position
:
absolute
;
left
:
-10px
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
a510fe11
.page-with-sidebar
{
padding-top
:
$header-height
;
padding-bottom
:
25px
;
padding
:
$header-height
0
25px
;
transition
:
padding
$sidebar-transition-duration
;
&
.page-sidebar-pinned
{
...
...
@@ -15,6 +14,7 @@
bottom
:
0
;
left
:
0
;
height
:
100%
;
width
:
0
;
overflow
:
hidden
;
transition
:
width
$sidebar-transition-duration
;
@include
box-shadow
(
2px
0
16px
0
$black-transparent
);
...
...
@@ -150,14 +150,6 @@
}
}
.page-sidebar-collapsed
{
padding-left
:
0
;
.sidebar-wrapper
{
width
:
0
;
}
}
.page-sidebar-expanded
{
.sidebar-wrapper
{
width
:
$sidebar_width
;
...
...
@@ -173,7 +165,7 @@
}
}
header
.header-
pinned-nav
{
header
.header-
sidebar-pinned
{
@media
(
min-width
:
$sidebar-breakpoint
)
{
padding-left
:
(
$sidebar_width
+
$gl-padding
);
...
...
app/assets/stylesheets/pages/builds.scss
View file @
a510fe11
...
...
@@ -48,12 +48,6 @@
margin-bottom
:
10px
;
}
}
.page-sidebar-collapsed
{
.scroll-controls
{
left
:
70px
;
}
}
}
.build-header
{
...
...
app/helpers/nav_helper.rb
View file @
a510fe11
...
...
@@ -14,8 +14,6 @@ module NavHelper
def
page_sidebar_class
if
pinned_nav?
"page-sidebar-expanded page-sidebar-pinned"
else
"page-sidebar-collapsed"
end
end
...
...
@@ -43,9 +41,7 @@ module NavHelper
class_name
<<
" with-horizontal-nav"
if
defined?
(
nav
)
&&
nav
if
pinned_nav?
class_name
<<
" header-expanded header-pinned-nav"
else
class_name
<<
" header-collapsed"
class_name
<<
" header-sidebar-expanded header-sidebar-pinned"
end
class_name
...
...
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