bottom navigation functionality

This commit is contained in:
2025-12-02 11:46:59 -06:00
parent 8af6ee7cd5
commit 70806b80ee
6 changed files with 59 additions and 14 deletions

View File

@@ -3,7 +3,11 @@ const parser = new DOMParser();
fetch("/_bottomnav.html")
.then(response => response.text())
.then(text => {
const bottomNav = parser.parseFromString(text, "text/html");
const bottomNavHTML = parser.parseFromString(text, "text/html");
const bottomNav = bottomNavHTML.getElementById("bottomnav");
document.body.appendChild(bottomNav.getElementById("bottomnav"));
const pathSpan = bottomNav.querySelector("span");
pathSpan.innerText = pathSpan.innerText.replace("%PATH%", document.location.pathname);
document.body.appendChild(bottomNav);
});