take account of different languages
This commit is contained in:
parent
176fb0d1d0
commit
c6ce87d65c
1 changed files with 3 additions and 1 deletions
|
@ -21,10 +21,12 @@ menuTrigger &&
|
|||
|
||||
window.addEventListener("resize", isMobileMenu);
|
||||
|
||||
const language = document.getElementsByTagName('html')[0].lang;
|
||||
const logo = document.querySelector(".logo__pathname");
|
||||
if(logo){
|
||||
window.onload = () => {
|
||||
const path = window.location.pathname.substring(1);
|
||||
let path = window.location.pathname.substring(1);
|
||||
path = path.replace(language+'/','')
|
||||
logo.textContent += path.substring(0,path.indexOf('/'));
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue