Mobile nav bar

Self closing divs to make stuff easier to read
This commit is contained in:
Michał Gdula 2024-04-25 23:32:04 +01:00
parent 4433d7cc19
commit 8ab0957a85
7 changed files with 91 additions and 51 deletions

View file

@ -8,7 +8,9 @@
let oldLocation = undefined;
let showNavBar = false;
let fullWidth = false;
let scrollY = 0;
let windowScrollY = 0;
let windowWidth = 0;
function routeLoading(event) {
if (event.detail.location === oldLocation) {
@ -24,14 +26,15 @@
}
</script>
<svelte:window bind:scrollY={scrollY} />
<svelte:window bind:scrollY={windowScrollY} bind:innerWidth={windowWidth} />
<svelte:head>
<link rel="stylesheet" href="https://api.fontshare.com/v2/css?f[]=erode@300,301,400,401,500,501,600,601,700,701,1,2&display=swap">
</svelte:head>
{#if showNavBar }
<NavigationBar
scrolled={scrollY > 0}
scrolled={windowScrollY > 0}
mobile={windowWidth < 700}
/>
{/if}
<main