adjust desktop desktop nav
This commit is contained in:
parent
81454b3e4e
commit
b8de28aade
5 changed files with 21 additions and 17 deletions
|
|
@ -82,7 +82,6 @@ function toggleLogoState() {
|
|||
}
|
||||
|
||||
function togglePanel(side, event) {
|
||||
event.stopPropagation();
|
||||
document.querySelector(`.panel--${side}`).classList.toggle("open");
|
||||
const isOpen = document
|
||||
.querySelector(`.panel--${side}`)
|
||||
|
|
@ -95,12 +94,15 @@ function togglePanel(side, event) {
|
|||
document.querySelector("html").style.overflowY = "hidden";
|
||||
document.querySelector("#main-header").classList.remove("minimized");
|
||||
}
|
||||
} else if (window.innerWidth < 640) {
|
||||
document.querySelector("html").style.overflowY = "";
|
||||
if (scrollY > 10) {
|
||||
document.querySelector("#main-header").classList.add("minimized");
|
||||
} else {
|
||||
if (window.innerWidth < 640) {
|
||||
document.querySelector("html").style.overflowY = "";
|
||||
if (scrollY > 10) {
|
||||
document.querySelector("#main-header").classList.add("minimized");
|
||||
}
|
||||
}
|
||||
}
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
function closePanels() {
|
||||
|
|
@ -135,6 +137,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
|
||||
setWindowHeightFactor();
|
||||
window.addEventListener("resize", () => {
|
||||
setWindowHeightFactor();
|
||||
});
|
||||
|
||||
fixFootNotes();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue