chore: fixes

This commit is contained in:
MattTheTekie 2026-04-23 18:21:40 -04:00
commit a91757e135

View file

@ -147,16 +147,30 @@ function showAbout(event) {
const section = temp.querySelector("#aboutSection");
if (section) {
// KEEP the entire section, including "Welcome to The About Us Area."
if (!section) {
target.innerHTML = "<h2>About</h2><p>Missing #aboutSection</p>";
return;
}
// Find the element that contains kirby19.gif
const startEl = section.querySelector('img[src*="kirby19.gif"]');
if (startEl) {
// Remove everything BEFORE the Kirby image
let current = section.firstChild;
while (current && current !== startEl) {
const next = current.nextSibling;
current.remove();
current = next;
}
// Now render from Kirby onward
target.innerHTML = section.outerHTML;
} else {
target.innerHTML = `
<div class="text-containers-main-bg content-box">
<h2>About</h2>
<p>Missing #aboutSection in about.html</p>
</div>
`;
// fallback: if image not found, show full section
target.innerHTML = section.outerHTML;
}
})
.catch(err => {