append url pathname to logoText

This commit is contained in:
scosti 2023-01-26 00:43:08 +01:00
parent 345c1cb020
commit 153e94ecc0
3 changed files with 11 additions and 1 deletions

View file

@ -20,3 +20,10 @@ menuTrigger &&
);
window.addEventListener("resize", isMobileMenu);
const logo = document.querySelector(".logo__pathname");
if(logo){
window.onload = () => {
logo.textContent += window.location.pathname.substring(1);
};
}