/* ------ STAR WARS KOTOR SHRINE HEADER COMPONENT ------ */ document.querySelector(".main-header").innerHTML = ` `; /* Navigation component content */ document.querySelector(".navbar").innerHTML = ` `; // Make the navigation bar sticky const header = document.querySelector(".main-header"); const navbar = document.querySelector(".navbar"); window.addEventListener("scroll", e => { const scrollPos = window.scrollY || document.documentElement.scrollTop; const stickyLine = header.scrollHeight - navbar.scrollHeight; if (scrollPos > stickyLine) { navbar.classList.add("sticky-nav"); } else { navbar.classList.remove("sticky-nav"); } }); /* ------ STAR WARS KOTOR SHRINE SIDEBAR COMPONENT ------ */ document.querySelector(".right-sidebar").innerHTML = ` `; /* ------ STAR WARS KOTOR SHRINE FOOTER COMPONENT ------ */ document.querySelector(".main-footer").innerHTML = `

Made with ♥ and the Force by Leilukin | Shrine Launched: 17 February 2023

Back to top

`;