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>
|
||||
@@ -11,7 +11,7 @@
|
||||
top: var(--inset);
|
||||
left: var(--inset);
|
||||
right: var(--inset);
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
transform: translate3d(0, -88px, 0);
|
||||
transition: transform 1s var(--ease-quart);
|
||||
transition-delay: 100ms;
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
@include bp (sm) {
|
||||
--inset: 32px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
// Visible state
|
||||
|
||||
Reference in New Issue
Block a user