This commit is contained in:
Julie Blanc 2025-12-19 10:17:06 +01:00
parent 8c604d12c9
commit 79833e88a7
13 changed files with 455 additions and 11 deletions

View file

@ -1,6 +1,6 @@
window.onload = function () {
includeHTML();
headerShrink();
headerToggle();
};
window.onscroll = function () {
@ -9,15 +9,12 @@ window.onscroll = function () {
function headerShrink() {
function headerToggle() {
const header = document.getElementById('site-header');
const scrollPosition = window.scrollY || document.documentElement.scrollTop;
if (scrollPosition > 100) {
header.classList.add('is-shrinked');
} else {
header.classList.remove('is-shrinked');
}
const buttonToggle = document.querySelector('menu-toggle');
console.log(buttonToggle);
}