mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-01 16:13:10 +00:00
Mobile nav bar
Self closing divs to make stuff easier to read
This commit is contained in:
parent
4433d7cc19
commit
8ab0957a85
7 changed files with 91 additions and 51 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue