layout in detailview

This commit is contained in:
June 2025-08-12 23:59:53 +12:00
parent c25f95949b
commit eae36b8da5
Signed by: breadone
GPG Key ID: FDC19FE143200483
3 changed files with 16 additions and 13 deletions

View File

@ -10,7 +10,9 @@ import Header from "@/components/Header";
<body>
<main id="main" class="flex-1">
<Header/>
<div class="px-5 pt-2">
<slot />
</div>
</main>
</body>
</html>

View File

@ -7,7 +7,6 @@ const recipies = await client.collection("recipes").getFullList()
---
<PageLayout>
<div id="content" class="p-5 pt-2">
<!-- <p class="pb-2">What would you like today?</p> -->
<div class="grid gap-2 grid-cols-1 md:grid-cols-2 lg:grid-cols-4">
@ -19,6 +18,5 @@ const recipies = await client.collection("recipes").getFullList()
))
}
</div>
</div>
</PageLayout>

View File

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