Add hero carousel with 5 images, enlarge logo, fix Pathfinder references

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 17:15:42 -05:00
co-authored by Claude Sonnet 4.6
parent e84624d8f6
commit 5318c00b1c
9 changed files with 74 additions and 35 deletions
+18 -3
View File
@@ -1,9 +1,9 @@
function loadHTML(file, elementId) {
function loadHTML(file, elementId, callback) {
fetch(file)
.then(r => r.text())
.then(html => {
document.getElementById(elementId).innerHTML = html;
if (elementId === 'header') highlightActiveNav();
if (callback) callback();
})
.catch(err => console.error('Error loading:', file, err));
}
@@ -17,5 +17,20 @@ function highlightActiveNav() {
});
}
loadHTML('/header.html', 'header');
function startCarousel() {
const slides = document.querySelectorAll('#hero-carousel .carousel-slide');
if (!slides.length) return;
let current = 0;
slides[current].style.opacity = '1';
setInterval(() => {
slides[current].style.opacity = '0';
current = (current + 1) % slides.length;
slides[current].style.opacity = '1';
}, 5000);
}
loadHTML('/header.html', 'header', () => {
highlightActiveNav();
startCarousel();
});
loadHTML('/footer.html', 'footer');