Fix mobile navbar

This commit is contained in:
Jeremy Thomas
2018-04-13 17:03:40 +01:00
parent ddd15f70e3
commit a90a5153b9
10 changed files with 33 additions and 27 deletions

View File

@@ -272,22 +272,11 @@ document.addEventListener('DOMContentLoaded', () => {
const specialShadow = document.getElementById('specialShadow');
const NAVBAR_HEIGHT = 52;
const THRESHOLD = 160;
let navbarOpen = false;
let horizon = NAVBAR_HEIGHT;
let whereYouStoppedScrolling = 0;
let scrollFactor = 0;
let currentTranslate = 0;
navbarBurger.addEventListener('click', el => {
navbarOpen = !navbarOpen;
if (navbarOpen) {
rootEl.classList.add('bd-is-clipped-touch');
} else {
rootEl.classList.remove('bd-is-clipped-touch');
}
});
// Anchors highlight
let past_anchors = [];