First version of the new layout.

This commit is contained in:
2026-02-12 02:58:57 +01:00
parent 46395bb945
commit 124c97e6cc
278 changed files with 500 additions and 83715 deletions

View File

@@ -0,0 +1,32 @@
// JIT file loading
function include_file(filename, id) {
fetch(`includes/${filename}.html`)
.then(response => response.text())
.then(html => { document.getElementById(id).innerHTML = html; })
.catch(err => console.error('Error loading include:', err));
}
function setupIntersectionObserver() {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const element = entry.target;
const name = element.getAttribute('data-section-name');
include_file(name, element.id);
observer.unobserve(element);
}
});
}, {
threshold: 0.05,
rootMargin: "0px 0px -50px 0px"
});
const observedSections = document.querySelectorAll('.observed');
if (observedSections.length === 0) {
console.error('No elements with class "observed" found!');
} else {
observedSections.forEach(section => { observer.observe(section); });
}
}
setupIntersectionObserver();