[wip] List photos on location page
This commit is contained in:
@@ -7,23 +7,29 @@
|
|||||||
export let photos: any
|
export let photos: any
|
||||||
|
|
||||||
const { params } = $page
|
const { params } = $page
|
||||||
|
let descriptionEl: HTMLElement
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>Hello {data.name}</h1>
|
<main class="location">
|
||||||
|
<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"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
<script context="module" lang="ts">
|
<script context="module" lang="ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user