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 @@
...
@@ -14,11 +14,9 @@
const pinnedPageClass = 'page-sidebar-pinned';
const pinnedPageClass = 'page-sidebar-pinned';
const expandedPageClass = 'page-sidebar-expanded';
const expandedPageClass = 'page-sidebar-expanded';
const collapsedPageClass = 'page-sidebar-collapsed';
const pinnedNavbarClass = 'header-pinned-nav';
const pinnedNavbarClass = 'header-sidebar-pinned';
const expandedNavbarClass = 'header-expanded';
const expandedNavbarClass = 'header-sidebar-expanded';
const collapsedNavbarClass = 'header-collapsed';
class Sidebar {
class Sidebar {
constructor() {
constructor() {
...
@@ -75,12 +73,10 @@
...
@@ -75,12 +73,10 @@
renderState() {
renderState() {
$(pageSelector)
$(pageSelector)
.toggleClass(pinnedPageClass, this.isPinned && this.isExpanded)
.toggleClass(pinnedPageClass, this.isPinned && this.isExpanded)
.toggleClass(expandedPageClass, this.isExpanded)
.toggleClass(expandedPageClass, this.isExpanded);
.toggleClass(collapsedPageClass, !this.isExpanded);
$(navbarSelector)
$(navbarSelector)
.toggleClass(pinnedNavbarClass, this.isPinned && this.isExpanded)
.toggleClass(pinnedNavbarClass, this.isPinned && this.isExpanded)
.toggleClass(expandedNavbarClass, this.isExpanded)
.toggleClass(expandedNavbarClass, this.isExpanded);
.toggleClass(collapsedNavbarClass, !this.isExpanded);
const $pinnedToggle = $(pinnedToggleSelector);
const $pinnedToggle = $(pinnedToggleSelector);
const tooltipText = this.isPinned ? 'Unpin navigation' : 'Pin navigation';
const tooltipText = this.isPinned ? 'Unpin navigation' : 'Pin navigation';
...
...
app/assets/stylesheets/framework/header.scss
View file @
a510fe11
...
@@ -77,10 +77,6 @@ header {
...
@@ -77,10 +77,6 @@ header {
}
}
}
}
&
.header-collapsed
{
padding
:
0
16px
;
}
.side-nav-toggle
{
.side-nav-toggle
{
position
:
absolute
;
position
:
absolute
;
left
:
-10px
;
left
:
-10px
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
a510fe11
.page-with-sidebar
{
.page-with-sidebar
{
padding-top
:
$header-height
;
padding
:
$header-height
0
25px
;
padding-bottom
:
25px
;
transition
:
padding
$sidebar-transition-duration
;
transition
:
padding
$sidebar-transition-duration
;
&
.page-sidebar-pinned
{
&
.page-sidebar-pinned
{
...
@@ -15,6 +14,7 @@
...
@@ -15,6 +14,7 @@
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
height
:
100%
;
height
:
100%
;
width
:
0
;
overflow
:
hidden
;
overflow
:
hidden
;
transition
:
width
$sidebar-transition-duration
;
transition
:
width
$sidebar-transition-duration
;
@include
box-shadow
(
2px
0
16px
0
$black-transparent
);
@include
box-shadow
(
2px
0
16px
0
$black-transparent
);
...
@@ -150,14 +150,6 @@
...
@@ -150,14 +150,6 @@
}
}
}
}
.page-sidebar-collapsed
{
padding-left
:
0
;
.sidebar-wrapper
{
width
:
0
;
}
}
.page-sidebar-expanded
{
.page-sidebar-expanded
{
.sidebar-wrapper
{
.sidebar-wrapper
{
width
:
$sidebar_width
;
width
:
$sidebar_width
;
...
@@ -173,7 +165,7 @@
...
@@ -173,7 +165,7 @@
}
}
}
}
header
.header-
pinned-nav
{
header
.header-
sidebar-pinned
{
@media
(
min-width
:
$sidebar-breakpoint
)
{
@media
(
min-width
:
$sidebar-breakpoint
)
{
padding-left
:
(
$sidebar_width
+
$gl-padding
);
padding-left
:
(
$sidebar_width
+
$gl-padding
);
...
...
app/assets/stylesheets/pages/builds.scss
View file @
a510fe11
...
@@ -48,12 +48,6 @@
...
@@ -48,12 +48,6 @@
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
}
}
.page-sidebar-collapsed
{
.scroll-controls
{
left
:
70px
;
}
}
}
}
.build-header
{
.build-header
{
...
...
app/helpers/nav_helper.rb
View file @
a510fe11
...
@@ -14,8 +14,6 @@ module NavHelper
...
@@ -14,8 +14,6 @@ module NavHelper
def
page_sidebar_class
def
page_sidebar_class
if
pinned_nav?
if
pinned_nav?
"page-sidebar-expanded page-sidebar-pinned"
"page-sidebar-expanded page-sidebar-pinned"
else
"page-sidebar-collapsed"
end
end
end
end
...
@@ -43,9 +41,7 @@ module NavHelper
...
@@ -43,9 +41,7 @@ module NavHelper
class_name
<<
" with-horizontal-nav"
if
defined?
(
nav
)
&&
nav
class_name
<<
" with-horizontal-nav"
if
defined?
(
nav
)
&&
nav
if
pinned_nav?
if
pinned_nav?
class_name
<<
" header-expanded header-pinned-nav"
class_name
<<
" header-sidebar-expanded header-sidebar-pinned"
else
class_name
<<
" header-collapsed"
end
end
class_name
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