From 8af6ee7cd5ddc81464e070b86121326cd2bc9584 Mon Sep 17 00:00:00 2001 From: Lucielle Date: Tue, 2 Dec 2025 10:22:42 -0600 Subject: [PATCH] load bottomnav from js --- _bottomnav.html | 5 +++++ assets/global.js | 9 +++++++++ assets/index.js | 0 index.html | 6 +----- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 _bottomnav.html create mode 100644 assets/global.js delete mode 100644 assets/index.js diff --git a/_bottomnav.html b/_bottomnav.html new file mode 100644 index 0000000..551eb89 --- /dev/null +++ b/_bottomnav.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/assets/global.js b/assets/global.js new file mode 100644 index 0000000..6e0ebf2 --- /dev/null +++ b/assets/global.js @@ -0,0 +1,9 @@ +const parser = new DOMParser(); + +fetch("/_bottomnav.html") +.then(response => response.text()) +.then(text => { + const bottomNav = parser.parseFromString(text, "text/html"); + + document.body.appendChild(bottomNav.getElementById("bottomnav")); +}); \ No newline at end of file diff --git a/assets/index.js b/assets/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/index.html b/index.html index 3721de6..d322855 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Im bad at naming things +
@@ -13,10 +14,5 @@ Lucielle
- \ No newline at end of file