[wip] List photos on location page
This commit is contained in:
@@ -7,23 +7,29 @@
|
||||
export let photos: any
|
||||
|
||||
const { params } = $page
|
||||
let descriptionEl: HTMLElement
|
||||
</script>
|
||||
|
||||
<h1>Hello {data.name}</h1>
|
||||
|
||||
{#each photos as { image: { id, title }, slug }}
|
||||
<div class="photo">
|
||||
<a href="/{params.country}/{params.location}/{slug}">
|
||||
<Image
|
||||
id={id}
|
||||
alt="{title}, {data.name}"
|
||||
width={1000}
|
||||
height={600}
|
||||
format="webp"
|
||||
/>
|
||||
</a>
|
||||
<main class="location">
|
||||
<h1>Hello {data.name}</h1>
|
||||
<div class="location__description" bind:this={descriptionEl}>
|
||||
{@html data.description}
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
{#each photos as { image: { id, title }, slug }}
|
||||
<div class="photo">
|
||||
<a href="/{params.country}/{params.location}/{slug}">
|
||||
<Image
|
||||
id={id}
|
||||
alt="{title}"
|
||||
width={1000}
|
||||
height={600}
|
||||
format="webp"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
{/each}
|
||||
</main>
|
||||
|
||||
|
||||
<script context="module" lang="ts">
|
||||
|
||||
Reference in New Issue
Block a user