Files
2026-07-06 05:23:59 +00:00

20 lines
524 B
JavaScript

// bonzi homepage - minimal, no framework
(() => {
'use strict';
const blocks = document.querySelectorAll('[data-reveal]');
if ('IntersectionObserver' in window) {
const io = new IntersectionObserver((entries) => {
entries.forEach((e) => {
if (e.isIntersecting) {
e.target.classList.add('in');
io.unobserve(e.target);
}
});
}, { threshold: 0.1 });
blocks.forEach((b) => io.observe(b));
} else {
blocks.forEach((b) => b.classList.add('in'));
}
})();