chore: fixes
This commit is contained in:
parent
6932f9dae4
commit
ab45dfde81
2 changed files with 5 additions and 62 deletions
17
legacy.html
17
legacy.html
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue