Hide fixed nav ShopLocationSwitcher on mobile
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
const { shop, shopLocations }: any = getContext('shop')
|
||||
|
||||
let innerWidth: number
|
||||
let navObserver: IntersectionObserver
|
||||
let introEl: HTMLElement, navChooseEl: HTMLElement
|
||||
let scrolledPastIntro = false
|
||||
@@ -104,6 +105,9 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:window bind:innerWidth />
|
||||
|
||||
|
||||
<section class="shop-page__intro" bind:this={introEl}>
|
||||
<div class="top container">
|
||||
<a href="/" class="back" data-sveltekit-noscroll>
|
||||
@@ -155,6 +159,8 @@
|
||||
class:is-visible={scrolledPastIntro}
|
||||
class:is-overlaid={$cartOpen}
|
||||
>
|
||||
<ShopLocationSwitcher />
|
||||
{#if innerWidth > 768}
|
||||
<ShopLocationSwitcher />
|
||||
{/if}
|
||||
<ButtonCart />
|
||||
</nav>
|
||||
Reference in New Issue
Block a user