diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index c4b2d7f..c61a325 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -9,7 +9,21 @@ const url = Astro.url; ---
{ + this.open = value < 768 ? false : true; + }); + window.addEventListener('resize', () => { + this.$nextTick(() => { + this.windowWidth = window.innerWidth; + }); + }); + } + }`} + x-init="init()" class="flex flex-col max-w-screen-xl px-4 mx-auto md:items-center md:justify-between md:flex-row md:px-6 lg:px-8 z-10 md:pt-2 relative">