adjust desktop desktop nav

This commit is contained in:
isUnknown 2024-04-15 16:01:13 +02:00
parent 81454b3e4e
commit b8de28aade
5 changed files with 21 additions and 17 deletions

View file

@ -1,4 +1,5 @@
article .content {
scroll-margin-block-start: calc(var(--unit--vertical) * 6);
margin-top: calc(var(--unit--vertical) * 2);
padding-bottom: calc(var(--unit--vertical) * 2);
}

View file

@ -138,10 +138,6 @@ button.toggle.right::before {
}
@media screen and (min-width: 640px) {
#main-header {
display: flex;
justify-content: center;
}
#logo {
width: 37vw;
}

View file

@ -62,10 +62,12 @@ html {
@media screen and (min-width: 640px) {
:root {
--padding-body: calc(12 * var(--unit--horizontal));
--padding-body: calc(15 * var(--unit--horizontal));
}
body {
padding-left: var(--padding-body);
max-width: calc(17 * var(--unit--horizontal));
body,
#logo {
max-width: calc(22 * var(--unit--horizontal));
padding-left: var(--padding-body) !important;
box-sizing: content-box;
}
}

View file

@ -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();