Add Poster image from Shop page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user