chore: fixes
This commit is contained in:
parent
2c2ed966d9
commit
a91757e135
1 changed files with 22 additions and 8 deletions
30
legacy.html
30
legacy.html
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue