chore: fixes

This commit is contained in:
MattTheTekie 2026-04-23 18:22:34 -04:00
commit 2c09dbd6cd

View file

@ -152,26 +152,25 @@ function showAbout(event) {
return; return;
} }
// Find the element that contains kirby19.gif const startImg = section.querySelector('img[src*="kirby19.gif"]');
const startEl = section.querySelector('img[src*="kirby19.gif"]');
if (startEl) { if (!startImg) {
// 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 {
// fallback: if image not found, show full section
target.innerHTML = section.outerHTML; target.innerHTML = section.outerHTML;
return;
} }
// Build a new container starting from Kirby
const newSection = document.createElement("div");
newSection.id = "aboutSection";
let node = startImg;
while (node) {
newSection.appendChild(node.cloneNode(true));
node = node.nextSibling;
}
target.innerHTML = newSection.outerHTML;
}) })
.catch(err => { .catch(err => {
console.error(err); console.error(err);