Make PostCard content dynamic

This commit is contained in:
2021-10-14 23:19:09 +02:00
parent 2ed411a94e
commit 2ea5cbecda
2 changed files with 40 additions and 22 deletions

View File

@@ -120,7 +120,13 @@
}
location {
slug
country { slug }
name
region
country {
slug
name
flag { id }
}
}
}
}
@@ -250,7 +256,7 @@
<div class="grid container">
{#if photos.length}
<div class="photos__grid">
{#each photos as { image, slug, location }}
{#each photos as { image, slug, location, title }}
<div class="photo shadow-photo">
<a href="/{location.country.slug}/{location.slug}/{slug}">
<Image
@@ -263,7 +269,13 @@
ratio={1.5}
alt={image.title}
/>
<PostCard />
<PostCard
street={title}
location={location.name}
region={location.region}
country={location.country.name}
flagId={location.country.flag.id}
/>
</a>
</div>
{/each}
@@ -338,7 +350,13 @@
}
location {
slug
country { slug }
name
region
country {
slug
name
flag { id }
}
}
date_created
}