From 40001ac757bd37c8dc21563ea971d2cda8679aff Mon Sep 17 00:00:00 2001 From: Dome Date: Wed, 22 Apr 2026 01:30:12 +0200 Subject: [PATCH] Update toc.js --- js/toc.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/js/toc.js b/js/toc.js index 1d1de02..f5f4018 100644 --- a/js/toc.js +++ b/js/toc.js @@ -78,10 +78,6 @@ document.addEventListener('DOMContentLoaded', function () { document.documentElement.style.setProperty('--zeitfresser-toc-width', tocWidth + 'px'); } - /** - * ✅ FINAL: Footer Collision ohne Layout-Bruch - * Nutzt nur transform statt top/position - */ function handleFooterCollision() { if (!isDesktop()) { toc.style.transform = ''; @@ -94,7 +90,7 @@ document.addEventListener('DOMContentLoaded', function () { var footerRect = footer.getBoundingClientRect(); var tocRect = toc.getBoundingClientRect(); - var offset = 40; // finaler Abstand + var offset = 40; var triggerOffset = Math.min(200, window.innerHeight * 0.2); var overlap = tocRect.bottom - (footerRect.top - triggerOffset); @@ -165,7 +161,7 @@ document.addEventListener('DOMContentLoaded', function () { window.requestAnimationFrame(function () { syncPosition(); - handleFooterCollision(); // 👈 stabil integriert + handleFooterCollision(); updateProgress(); updateActiveHeading(); ticking = false;