chore: fixes

This commit is contained in:
MattTheTekie 2026-04-23 18:02:21 -04:00
commit ab45dfde81
2 changed files with 5 additions and 62 deletions

View file

@ -130,7 +130,11 @@ function showAbout(event) {
const section = temp.querySelector("#aboutSection");
target.innerHTML = section
? section.innerHTML
? `
<div class="home-text text-containers-secondary-bg">
${section.innerHTML}
</div>
`
: "<h2>About</h2><p>Missing #aboutSection in about.html</p>";
})
.catch(err => {
@ -138,17 +142,6 @@ function showAbout(event) {
target.innerHTML = "<h2>About</h2><p>Error loading page</p>";
});
}
function showCode(event) {
if (event) event.preventDefault();
document.getElementById("content").innerHTML = `
<div class="text-containers-main-bg content-box">
<center><h2>Code</h2></center>
<p>Project repositories and experiments will be listed here.</p>
</div>
`;
}
</script>
</body>

View file

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>About - Legacy Veltron</title>
<link rel="stylesheet" href="css/legacy.css">
</head>
<body>
<div id="content" class="text-containers-main-bg content-box">
<center><h2>Loading...</h2></center>
</div>
</main>
</div>
<!-- JS LOADER -->
<script>
window.addEventListener("load", () => {
const target = document.getElementById("content");
console.log("target:", target);
if (!target) return;
fetch("/about.html")
.then(res => {
console.log("status:", res.status);
return res.text();
})
.then(html => {
const temp = document.createElement("div");
temp.innerHTML = html;
const section = temp.querySelector("#aboutSection");
target.innerHTML = section
? section.innerHTML
: "<h2>About</h2><p>Failed to load content</p>";
})
.catch(err => {
console.error(err);
target.innerHTML = "<h2>About</h2><p>Error loading page</p>";
});
});
</script>
</body>
</html>