Fehler gefixt die beim Testen aufgefallen sind.

This commit is contained in:
Moritz Utcke
2025-02-17 11:24:07 +07:00
parent 74f05d404c
commit 5f8d30a5a3
17 changed files with 116 additions and 103 deletions

View File

@@ -16,21 +16,25 @@ const { title } = Astro.props;
<script>
window.addEventListener("scroll", (event) => {
let scroll = window.scrollY;
const skala = document.getElementById("skala")
console.log(scroll);
if(scroll>=400){
document.getElementById('skala')?.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.remove('w-full');
if (skala) {
skala.classList.add('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
skala.classList.remove('w-full');
skala.style.borderBottom = "3px solid #e6e6e6";
}
document.getElementById('skala').style.borderBottom = "3px solid #e6e6e6";
const performanceBox = document.getElementById('performance-box')
if (performanceBox) {
performanceBox.style.maxWidth = "688.5px";
}
const progressBox = document.getElementById('progress-box');
document.getElementById('performance-box').style.maxWidth = "688.5px";
document.getElementById('progress-box').style.maxWidth = "688.5px";
if (progressBox) {
progressBox.style.maxWidth = "688.5px"
}
document.getElementById('formInput-1')?.classList.add('2xl:mt-[370px]');
@@ -38,11 +42,12 @@ console.log(scroll);
}else{
document.getElementById('skala')?.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20');
document.getElementById('skala')?.classList.add('w-full');
if (skala) {
skala.classList.remove('2xl:fixed','2xl:py-4','2xl:top-0','2xl:z-20')
skala.classList.add('w-full')
skala.style.borderBottom = "none";
}
document.getElementById('skala').style.borderBottom = "none";
document.getElementById('formInput-1')?.classList.remove('2xl:mt-[370px]');