🍎🌃 Checkpoint

./for-artists/index.html:69682263/463
./scripts/top-nav.js:69682263/693
This commit is contained in:
Glitch (fedizinefest)
2025-05-24 01:23:19 +00:00
parent b435ad6e8d
commit 42c69cc5e8
2 changed files with 31 additions and 5 deletions

31
scripts/top-nav.js Normal file
View File

@ -0,0 +1,31 @@
let navItems = [
{
"href": "/",
"title": "home"
},
{
"href": "/signup",
"title": "signup"
},
{
"href": "/status",
"title": "status"
},
{
"href": "/zines",
"title": "zines!"
},
]
function populateNav() {
let nav = document.getElementById("top-nav");
for (let i = 0; i < navItems.length; i++) {
let a = document.createElement("a");
a.classList.add("nav-item");
a.href = navItems[i].href;
a.innerHtml = " " + navItems[i].title + " "
nav.append(a);
}
}