Fixes
This commit is contained in:
+12
-12
@@ -1,13 +1,3 @@
|
||||
// document.addEventListener("DOMContentLoaded", function(){
|
||||
// // Handler when the DOM is fully loaded
|
||||
// var path = window.location.pathname;
|
||||
//
|
||||
// if(path === "/menuplans" || path === "/vagttelefon" || path === "/")
|
||||
// {
|
||||
// document.getElementById ('toggle').addEventListener ('click', toggleMenu, false);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// function toggleMenu() {
|
||||
// var buttonElement = document.getElementById('menuIcon');
|
||||
//
|
||||
@@ -39,11 +29,21 @@
|
||||
|
||||
function toggleMenu(menu) {
|
||||
let menuElement = document.getElementById(menu);
|
||||
let logoElement = document.getElementById("sdeLogo");
|
||||
let htmlElement = document.getElementsByTagName('html')[0];
|
||||
let mainElement = document.getElementsByTagName('main')[0];
|
||||
|
||||
if(menuElement.classList.contains("hide"))
|
||||
if(menuElement.classList.contains("hide")) {
|
||||
menuElement.classList.remove("hide");
|
||||
else
|
||||
mainElement.classList.remove("d-none");
|
||||
htmlElement.style.backgroundColor = 'rgb(255, 255, 255)';
|
||||
logoElement.src = '/images/logos/Logo-normal.svg';
|
||||
} else {
|
||||
menuElement.classList.add("hide");
|
||||
mainElement.classList.add("d-none");
|
||||
htmlElement.style.backgroundColor = 'rgb(0, 120, 138)';
|
||||
logoElement.src = '/images/logos/Logo-hvid.svg';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user