diff --git a/index.html b/index.html index b607492..34c5570 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@ - +
diff --git a/js/nav.footer.js b/js/nav.footer.js index c84dc3c..aa7d505 100644 --- a/js/nav.footer.js +++ b/js/nav.footer.js @@ -71,9 +71,54 @@ const footer = `
`; +const home_navbar = ` + + + + + +`; + document.addEventListener("DOMContentLoaded", () => { - document.getElementById("nav-placeholder").innerHTML = navbar; document.getElementById("footer-placeholder").innerHTML = footer; + try { + document.getElementById("nav-placeholder").innerHTML = navbar; + } + // For home-page + catch(err) { + document.getElementById("home-nav-placeholder").innerHTML = home_navbar; + } const mobile_menu = document.querySelector(".mobile-menu"), mobile_trigger = document.querySelector(".mobile-menu__trigger");