From 42c69cc5e886115f041829c9863bb9822fbafdc7 Mon Sep 17 00:00:00 2001 From: "Glitch (fedizinefest)" Date: Sat, 24 May 2025 01:23:19 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=8E=F0=9F=8C=83=20Checkpoint=20./for-a?= =?UTF-8?q?rtists/index.html:69682263/463=20./scripts/top-nav.js:69682263/?= =?UTF-8?q?693?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- for-artists/index.html | 5 ----- scripts/top-nav.js | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 scripts/top-nav.js diff --git a/for-artists/index.html b/for-artists/index.html index 36dabd1..2a1a6f3 100644 --- a/for-artists/index.html +++ b/for-artists/index.html @@ -47,11 +47,6 @@
diff --git a/scripts/top-nav.js b/scripts/top-nav.js new file mode 100644 index 0000000..7d12cfc --- /dev/null +++ b/scripts/top-nav.js @@ -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); + } +} \ No newline at end of file