This commit is contained in:
callum
2026-03-10 17:05:22 +00:00
commit 2c456a1279
6 changed files with 259 additions and 0 deletions

11
main.js Normal file
View File

@@ -0,0 +1,11 @@
// Fade in elements as they scroll into view
const observer = new IntersectionObserver((entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
}
}, { threshold: 0.1 });
document.querySelectorAll('section').forEach((el) => observer.observe(el));