Clean up fixed navbar
This commit is contained in:
parent
0278b91203
commit
b29414dfc0
|
@ -48,8 +48,11 @@ import _ from 'underscore';
|
||||||
});
|
});
|
||||||
|
|
||||||
function applyScrollNavClass() {
|
function applyScrollNavClass() {
|
||||||
$('.navbar-border').css('opacity', $(window).scrollTop() / 40);
|
const scrollOpacityHeight = 40;
|
||||||
|
$('.navbar-border').css('opacity', Math.min($(window).scrollTop() / scrollOpacityHeight, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).scroll(_.throttle(applyScrollNavClass, 100));
|
$(() => {
|
||||||
|
$(window).on('scroll', _.throttle(applyScrollNavClass, 100));
|
||||||
|
});
|
||||||
}).call(window);
|
}).call(window);
|
||||||
|
|
|
@ -116,10 +116,10 @@ header {
|
||||||
|
|
||||||
.navbar-border {
|
.navbar-border {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
position: fixed;
|
position: absolute;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 50px;
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
background-color: $border-color;
|
background-color: $border-color;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -689,7 +689,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.merge-request-tabs-holder {
|
.merge-request-tabs-holder {
|
||||||
top: 0;
|
top: $header-height;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
background-color: $white-light;
|
background-color: $white-light;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue