Add Poster image from Shop page

This commit is contained in:
2021-11-03 22:01:38 +01:00
parent 230a5568e8
commit 439cdaee98
2 changed files with 22 additions and 5 deletions

View File

@@ -1,15 +1,29 @@
<script lang="ts">
import Button from '$components/atoms/Button.svelte'
import Image from '$components/atoms/Image.svelte'
export let slug: string
export let location: { name: string, slug: string }
export let image: any
</script>
<div class="poster">
<img src="https://picsum.photos/326/475" width={326} height={475} alt="blob">
{#if image}
<Image
id={image.id}
sizeKey="product"
sizes={{
small: { width: 326 },
medium: { width: 326 },
large: { width: 326 },
}}
ratio={1.5}
alt="Poster of {location.name}"
/>
{/if}
<div class="buttons">
<Button
size="xsmall"
url="/shop/poster-{slug}"
url="/shop/poster-{location.slug}"
text="View"
/>
<Button