// main- visual document.addEventListener("DOMContentLoaded", function(){ const root = document.getElementById("calendar-page"); setTimeout(()=> root.classList.add("loaded"), 100); }); // animation document.addEventListener("DOMContentLoaded", function(){ const targets = document.querySelectorAll(".reveal-curtain, .reveal-blur"); const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if(entry.isIntersecting){ const elements = [...document.querySelectorAll(".reveal-curtain, .reveal-blur")]; const index = elements.indexOf(entry.target); if (entry.target.classList.contains("reveal-blur")) { entry.target.style.transitionDelay = "0s"; } else { entry.target.style.transitionDelay = `${index * 0.4}s`; } entry.target.classList.add("is-animated"); observer.unobserve(entry.target); } }); }, { threshold: 0.1 }); targets.forEach(t => observer.observe(t)); }); // document.addEventListener("DOMContentLoaded", function(){ const targets = document.querySelectorAll(".reveal-curtain-up, .reveal-fade, .reveal-up"); const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if(entry.isIntersecting){ entry.target.classList.add("is-animated"); observer.unobserve(entry.target); } }); }, { threshold: 0.4 }); targets.forEach(t => observer.observe(t)); });