bottom navigation functionality
This commit is contained in:
@@ -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);
|
||||
});
|
||||
Reference in New Issue
Block a user