This commit is contained in:
prototypa
2023-06-17 23:00:42 -04:00
parent 55ac0cd563
commit 8ff3675cfa
2 changed files with 8 additions and 1 deletions

View File

@ -35,6 +35,13 @@ import { SITE } from '~/config.mjs';
let lastKnownScrollPosition = window.scrollY;
let ticking = true;
attachEvent('#header nav', 'click', function () {
document.querySelector('[data-aw-toggle-menu]')?.classList.remove('expanded');
document.body.classList.remove('overflow-hidden');
document.getElementById('header')?.classList.remove('h-screen');
document.querySelector('#header nav')?.classList.add('hidden');
});
attachEvent('[data-aw-toggle-menu]', 'click', function (_, elem) {
elem.classList.toggle('expanded');
document.body.classList.toggle('overflow-hidden');