---
export const prerender = true;


import { getEntry, render } from "astro:content";

import { LinkPresets } from "@constants/link-presets";
import { LinkPreset } from "@/types/config";
import Markdown from "@components/common/markdown.astro";
import GridLayout from "@layouts/grid.astro";
import BackwardButton from "@components/backwardButton.astro";


const pageTitle = LinkPresets[LinkPreset.About].name;
const pageDescription = LinkPresets[LinkPreset.About].description;

const aboutPost = await getEntry("spec", "about");

if (!aboutPost) {
    throw new Error("About page content not found");
}

const { Content } = await render(aboutPost);
---

<GridLayout title={pageTitle} description={pageDescription}>
    <div class="flex w-full rounded-(--radius-large) overflow-hidden relative min-h-32">
        <div class="card-base z-10 px-9 py-6 relative w-full ">
            <BackwardButton currentPath={Astro.url.pathname} />
            <Markdown class="mt-2">
                <Content />
            </Markdown>
        </div>
    </div>
</GridLayout>