Fixed nav dropdown bg

This commit is contained in:
Asutosh Palai
2016-07-05 03:48:41 -04:00
parent e3b45e18a7
commit 8164feca14
2 changed files with 17 additions and 12 deletions

View File

@ -102,10 +102,10 @@ body {
&.affix {
position: fixed;
background: rgba(0, 0, 0, .6);
background: rgba(45, 44, 40, 0.6);
&.darken {
background: rgba(0, 0, 0, 1);
background: rgba(45, 44, 40, 1);
}
}
@ -145,8 +145,13 @@ body {
margin-bottom: 10px;
}
.active a {
.active a, .open a {
background: transparent !important;
color: white;
}
.dropdown-menu {
background-color: #565553;
}
@media (min-width: $screen-sm-min) {

View File

@ -5,18 +5,18 @@ $(function() {
var imgClass = (this.width/this.height > parent.width()/parent.height()) ? 'wide' : 'tall';
$(this).addClass(imgClass);
})
});
$(window).scroll(function() {
var scroll = $(window).scrollTop();
var fTop = $('#new-articles').position().top + $('#new-articles').height();
if (scroll >= fTop) {
$(".navbar-wrapper").addClass("darken");
var switchPos = $('#new-articles').position().top + $('#new-articles').height();
} else {
$(".navbar-wrapper").removeClass("darken");
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= switchPos) {
$(".navbar-wrapper").addClass("darken");
}
} else {
$(".navbar-wrapper").removeClass("darken");
}
});
});
function onYouTubeIframeAPIReady() {