diff --git a/_includes/footer.html b/_includes/footer.html index 92d02bda28..42ba901b14 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -107,21 +107,102 @@

- - + + + + if (isDark ^ (currentMode === "dark-mode")) { + setMode(); + } + + function setMode() { + document.body.classList.toggle("dark-mode") + + let layer5Logos = document.querySelectorAll("#layer5-logo"); + let allLogos = document.querySelectorAll("#logo-dark-light"); + if (document.body.classList.contains("dark-mode")) { + layer5Logos.forEach(e => e.src = '../assets/images/company-logo/layer5-dark-mode-logo.svg') + allLogos.forEach(e => e.src = e.dataset.logoForDark) + } else { + layer5Logos.forEach(e => e.src = '../assets/images/company-logo/layer5-no-trim.svg') + allLogos.forEach(e => e.src = e.dataset.logoForLight) + } + if (document.body.classList.contains("dark-mode")) { + localStorage.setItem("mode", "dark-mode") + } else { + localStorage.setItem("mode", "light-mode") + } + document.dispatchEvent(new CustomEvent("themeChange",{ + detail : {value : localStorage.getItem("mode")}, + bubbles: true , + })) + } + + diff --git a/_sass/footer.scss b/_sass/footer.scss index f4e8a955e3..3ca9ee4b87 100644 --- a/_sass/footer.scss +++ b/_sass/footer.scss @@ -1,8 +1,8 @@ .footer-columns { display: grid; grid-template-columns: repeat(4, 1fr); // Four equal columns for larger screens - gap: 20px; - width: 100%; + max-width: 100vw; + overflow-x: hidden; // Responsive two-column layout @media (max-width: 768px) {