[wip] Rework Shop
- Change strategy for content fetching - Add a route per page instead of using __layout for all - Change the behaviors of the posters section (add a carousel on small screens) - Change Poster buttons styling and make interactions only for desktop
This commit is contained in:
@@ -33,11 +33,11 @@
|
||||
text="View"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
text="Add to cart"
|
||||
color="pinklight"
|
||||
tag="button"
|
||||
size="xsmall"
|
||||
on:click={() => addToCart($cartId, product)}
|
||||
text="Add to cart"
|
||||
color="pink"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,10 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { goto } from '$app/navigation'
|
||||
import { shopLocations } from '$utils/stores/shop'
|
||||
import { getContext } from 'svelte'
|
||||
|
||||
export let isOver: boolean = false
|
||||
|
||||
const { shopLocations } = getContext('shop')
|
||||
|
||||
const classes = [
|
||||
'shop-locationswitcher',
|
||||
isOver && 'is-over',
|
||||
@@ -26,7 +28,7 @@
|
||||
<use xlink:href="#icon-map-pin" />
|
||||
</svg>
|
||||
<select on:change={quickLocationChange}>
|
||||
{#each $shopLocations as { name, slug }}
|
||||
{#each shopLocations as { name, slug }}
|
||||
<option value={slug} selected={slug === $page.params.name}>{name}</option>
|
||||
{/each}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user