chore: fixes
This commit is contained in:
parent
f92c1939e3
commit
fb3c7f7b46
1 changed files with 23 additions and 37 deletions
60
legacy.html
60
legacy.html
|
|
@ -89,28 +89,6 @@
|
|||
|
||||
<!-- PAGE SYSTEM -->
|
||||
<script>
|
||||
function showHome(event) {
|
||||
if (event) event.preventDefault();
|
||||
|
||||
document.getElementById("content").innerHTML = `
|
||||
<img src="images/digimon_thkh.1200-2533722281.jpg" width="100%" height="80%">
|
||||
<center>
|
||||
<p>Welcome to the Veltron Network!</p>
|
||||
</center>
|
||||
`;
|
||||
}
|
||||
|
||||
function showMembers(event) {
|
||||
if (event) event.preventDefault();
|
||||
|
||||
document.getElementById("content").innerHTML = `
|
||||
<div class="text-containers-main-bg content-box">
|
||||
<center><h2>Members</h2></center>
|
||||
<p>Member list coming soon...</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
function showAbout(event) {
|
||||
if (event) event.preventDefault();
|
||||
|
||||
|
|
@ -127,28 +105,36 @@ function showAbout(event) {
|
|||
const temp = document.createElement("div");
|
||||
temp.innerHTML = html;
|
||||
|
||||
const section = temp.querySelector("#aboutSection");
|
||||
const article = temp.querySelector("article.home-text.text-containers-secondary-bg");
|
||||
|
||||
target.innerHTML = section
|
||||
? section.innerHTML
|
||||
: "<h2>About</h2><p>Missing #aboutSection in about.html</p>";
|
||||
if (!article) {
|
||||
target.innerHTML = "<h2>About</h2><p>Missing article.home-text.text-containers-secondary-bg in about.html</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
// Convert children so we can get everything after the article
|
||||
const children = Array.from(temp.children);
|
||||
const index = children.indexOf(article);
|
||||
|
||||
let afterArticle = "";
|
||||
|
||||
if (index !== -1) {
|
||||
afterArticle = children
|
||||
.slice(index + 1)
|
||||
.map(el => el.outerHTML)
|
||||
.join("");
|
||||
}
|
||||
|
||||
target.innerHTML = `
|
||||
${article.outerHTML}
|
||||
${afterArticle}
|
||||
`;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue