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
Boxiang Sun
gitlab-ce
Commits
5e9625bf
Commit
5e9625bf
authored
Apr 24, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nav border on scroll
parent
cfea4883
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/assets/javascripts/layout_nav.js
app/assets/javascripts/layout_nav.js
+11
-0
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+4
-0
No files found.
app/assets/javascripts/layout_nav.js
View file @
5e9625bf
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, no-unused-vars, one-var, one-var-declaration-per-line, vars-on-top, max-len */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, no-unused-vars, one-var, one-var-declaration-per-line, vars-on-top, max-len */
import
_
from
'
underscore
'
;
(
function
()
{
(
function
()
{
var
hideEndFade
;
var
hideEndFade
;
...
@@ -45,4 +46,14 @@
...
@@ -45,4 +46,14 @@
}
}
});
});
});
});
function
applyScrollNavClass
()
{
if
(
$
(
window
).
scrollTop
()
>
0
)
{
$
(
'
.navbar-gitlab
'
).
addClass
(
'
scroll
'
);
}
else
{
$
(
'
.navbar-gitlab
'
).
removeClass
(
'
scroll
'
);
}
}
$
(
window
).
scroll
(
_
.
throttle
(
applyScrollNavClass
,
250
));
}).
call
(
window
);
}).
call
(
window
);
app/assets/stylesheets/framework/header.scss
View file @
5e9625bf
...
@@ -42,6 +42,10 @@ header {
...
@@ -42,6 +42,10 @@ header {
border-bottom
:
none
;
border-bottom
:
none
;
}
}
&
.scroll
{
border-bottom
:
1px
solid
$border-color
;
}
.container-fluid
{
.container-fluid
{
width
:
100%
!
important
;
width
:
100%
!
important
;
filter
:
none
;
filter
:
none
;
...
...
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