diff --git a/legacy.html b/legacy.html index 63a1d33..8281ce5 100644 --- a/legacy.html +++ b/legacy.html @@ -110,6 +110,7 @@ function showMembers(event) { `; } + function showAbout(event) { if (event) event.preventDefault(); @@ -126,37 +127,31 @@ function showAbout(event) { const temp = document.createElement("div"); temp.innerHTML = html; - const article = temp.querySelector("article.home-text.text-containers-secondary-bg"); + const section = temp.querySelector("#aboutSection"); - if (!article) { - target.innerHTML = "

About

Missing article.home-text.text-containers-secondary-bg in about.html

"; - 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} - `; + target.innerHTML = section + ? section.innerHTML + : "

About

Missing #aboutSection in about.html

"; }) .catch(err => { console.error(err); target.innerHTML = "

About

Error loading page

"; }); } + +function showCode(event) { + if (event) event.preventDefault(); + + document.getElementById("content").innerHTML = ` +
+

Code

+

Project repositories and experiments will be listed here.

+
+ `; +} + +start about on line under home-text text-containers-secondary-bg