basic hyperlinks

This commit is contained in:
June 2025-08-12 23:46:11 +12:00
parent c1910a71c6
commit c25f95949b
Signed by: breadone
GPG Key ID: FDC19FE143200483
2 changed files with 12 additions and 1 deletions

View File

@ -13,7 +13,9 @@ const recipies = await client.collection("recipes").getFullList()
<div class="grid gap-2 grid-cols-1 md:grid-cols-2 lg:grid-cols-4">
{
recipies.map(r => (
<OverviewCard recipe={r} />
<a href={`/recipe/${r.id}`}>
<OverviewCard recipe={r} />
</a>
))
}
</div>

View File

@ -0,0 +1,9 @@
---
import client from "@/data/pocketbase";
const { slug } = Astro.params;
const re = await client.collection("recipes").getOne(slug ?? "0");
---
{re.name}