From eae36b8da5d5c48937b75c442fa2b3505777b4ea Mon Sep 17 00:00:00 2001 From: june Date: Tue, 12 Aug 2025 23:59:53 +1200 Subject: [PATCH] layout in detailview --- src/layouts/base.astro | 4 +++- src/pages/index.astro | 20 +++++++++----------- src/pages/recipe/[slug].astro | 5 ++++- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/layouts/base.astro b/src/layouts/base.astro index 42a0407..e1de4e5 100644 --- a/src/layouts/base.astro +++ b/src/layouts/base.astro @@ -10,7 +10,9 @@ import Header from "@/components/Header";
- +
+ +
diff --git a/src/pages/index.astro b/src/pages/index.astro index dfe985d..babca22 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -7,18 +7,16 @@ const recipies = await client.collection("recipes").getFullList() --- -
- + -
- { - recipies.map(r => ( - - - - )) - } -
+
+ { + recipies.map(r => ( + + + + )) + }
diff --git a/src/pages/recipe/[slug].astro b/src/pages/recipe/[slug].astro index c37584b..36682eb 100644 --- a/src/pages/recipe/[slug].astro +++ b/src/pages/recipe/[slug].astro @@ -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} \ No newline at end of file + + {re.name} + \ No newline at end of file