quick fix: disable dynamic navbar-height

This commit is contained in:
Felix Hamann 2018-06-28 22:32:43 +02:00
parent 8d69904d47
commit 810b6f05cc
2 changed files with 18 additions and 5 deletions

View File

@ -18,8 +18,7 @@
} }
function update() { function update() {
var sticky = window.scrollY > 0; var sticky = window.scrollY > 30;
sticky = sticky && window.innerHeight < (document.scrollingElement.scrollHeight - 200);
nav.classList.toggle('navbar--sticky', sticky); nav.classList.toggle('navbar--sticky', sticky);
ticking = false; ticking = false;
} }
@ -28,7 +27,5 @@
})(); })();
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
// utils.stickynav(document.querySelector('.js-sticky-navbar'));
utils.stickynav(document.querySelector('.js-sticky-navbar'));
}); });

View File

@ -208,3 +208,19 @@
height: var(--header-height-collapsed); height: var(--header-height-collapsed);
} }
} }
@media (max-height: 768px) {
.navbar,
.navbar__pushdown {
height: var(--header-height-collapsed);
}
.navbar__link-wrapper {
height: var(--header-height-collapsed);
}
.navbar__logo {
top: 5px;
}
}