Create base layouts with basic blocks

This commit is contained in:
tobias
2024-05-19 06:57:49 +02:00
parent 8ef6ee2b2c
commit d4e0e1f994
7 changed files with 75 additions and 7 deletions

View File

@ -1,5 +1,5 @@
---
import Layout from "@/layouts/Layout.astro";
import ContentLayout from "@/layouts/ContentLayout.astro";
import Content from "@/components/Content.astro";
import type { Post } from "@/types";
import { getPost, getPosts } from "@/utils/payload";
@ -18,13 +18,13 @@ const post = id && (await getPost(id));
{
post ? (
<Layout title={`Paystro | ${post.title!}`}>
<ContentLayout title={`Paystro | ${post.title!}`}>
<div class="space-y-3 my-3">
<a href="/">BACK</a>
<h1 class="font-bold text-5xl">{post.title}</h1>
{post.content && <Content content={post.content} />}
</div>
</Layout>
</CLayout>
) : (
<div>404</div>
)