[wip] List photos on location page

This commit is contained in:
2021-10-02 20:38:13 +02:00
parent 7635358bbe
commit a95e8b91b2

View File

@@ -7,16 +7,21 @@
export let photos: any export let photos: any
const { params } = $page const { params } = $page
let descriptionEl: HTMLElement
</script> </script>
<main class="location">
<h1>Hello {data.name}</h1> <h1>Hello {data.name}</h1>
<div class="location__description" bind:this={descriptionEl}>
{@html data.description}
</div>
{#each photos as { image: { id, title }, slug }} {#each photos as { image: { id, title }, slug }}
<div class="photo"> <div class="photo">
<a href="/{params.country}/{params.location}/{slug}"> <a href="/{params.country}/{params.location}/{slug}">
<Image <Image
id={id} id={id}
alt="{title}, {data.name}" alt="{title}"
width={1000} width={1000}
height={600} height={600}
format="webp" format="webp"
@@ -24,6 +29,7 @@
</a> </a>
</div> </div>
{/each} {/each}
</main>
<script context="module" lang="ts"> <script context="module" lang="ts">