[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:
2021-12-14 23:23:12 +01:00
parent 140e8f1fa2
commit 82f5dd4727
17 changed files with 808 additions and 364 deletions

View File

@@ -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>