Added a body to the home page

This commit is contained in:
nke4 committed 2026-10-23 19:35:05 +02:00
1 parent 7b51551856
commit badec1af77
4 files changed
+203 -9

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
// Fade-in on scroll for elements with .reveal
(function () {
var items = document.querySelectorAll(".reveal");
if (!items.length) return;
var show = function (el) { el.classList.add("is-visible"); };
if (!("IntersectionObserver" in window)) {
items.forEach(show);
return;
}
// small stagger for siblings inside the same container
var groups = new Map();
items.forEach(function (el) {
var parent = el.parentElement;
var n = groups.get(parent) || 0;
el.style.setProperty("--delay", n * 120 + "ms");
groups.set(parent, n + 1);
});
var io = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (!entry.isIntersecting) return;
show(entry.target);
io.unobserve(entry.target);
});
}, { threshold: 0.15, rootMargin: "0px 0px -8% 0px" });
items.forEach(function (el) { io.observe(el); });
})();