diff --git a/js/customElements/mainMenu.js b/js/customElements/mainMenu.js index 9be85c5..945d541 100644 --- a/js/customElements/mainMenu.js +++ b/js/customElements/mainMenu.js @@ -16,6 +16,11 @@ class MainMenu extends HTMLElement { a.innerText = element["name"]; menuContainer.appendChild(a); + + if(window.location['pathname'] === element["url"]){ + document.title = element["name"] + " - Jonas Leder"; + } + } else if(element["type"] === "dropdown"){ let dropdown = document.createElement("div"); dropdown.className = "dropdown"; @@ -37,6 +42,10 @@ class MainMenu extends HTMLElement { let br = document.createElement("br"); dropdownContent.appendChild(br); + + if(window.location['pathname'] === childElement["url"]){ + document.title = childElement["name"] + " - Jonas Leder"; + } }); dropdown.appendChild(dropdownContent); diff --git a/public/internal/header.php b/public/internal/header.php index b065e9e..e0582fd 100644 --- a/public/internal/header.php +++ b/public/internal/header.php @@ -10,7 +10,6 @@ function getHeader($pagetitle)
-