updated docs for v1 and polished some minor fixes across the code

This commit is contained in:
Nuno Coração
2022-09-13 00:49:15 +01:00
parent 925155fb9c
commit 002db90080
446 changed files with 1271 additions and 2281 deletions

View File

@@ -0,0 +1,27 @@
function switchHomeLayout() {
const pageDiv = document.getElementById("page");
const profileDiv = document.getElementById("profile");
const layoutCode = document.querySelectorAll("code[id=layout]");
if (profileDiv.style.display === "none") {
profileDiv.style.display = "block";
pageDiv.style.display = "none";
layoutCode.forEach(function (el) {
el.innerText = "profile";
});
} else {
profileDiv.style.display = "none";
pageDiv.style.display = "block";
layoutCode.forEach(function (el) {
el.innerText = "page";
});
}
}
window.addEventListener("DOMContentLoaded", (event) => {
document.querySelectorAll("#switch-layout-button").forEach((button) =>
button.addEventListener("click", function (e) {
e.preventDefault();
switchHomeLayout();
})
);
});