This commit is contained in:
Moritz Utcke
2025-02-20 10:35:23 +11:00
parent 39476ac5d5
commit 8049af9f17
7 changed files with 24 additions and 24 deletions

View File

@@ -14,11 +14,14 @@ export interface Props {
const { title } = Astro.props;
---
<script>
const skala = document.getElementById("skala");
if (!skala?.classList.contains("no-scroll")) {
<script>
window.addEventListener("scroll", (event) => {
const skala = document.getElementById("skala");
if (skala?.classList.contains("no-scroll")) {
return;
}
let scroll = window.scrollY;
if (scroll >= 400) {
if (skala) {
@@ -63,7 +66,6 @@ const { title } = Astro.props;
?.classList.remove("2xl:mt-[370px]");
}
});
}
</script>
<html lang="de">