Initial commit

This commit is contained in:
2026-02-10 01:25:57 +01:00
commit 7020a6a339
53 changed files with 1503 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import { listPosts } from "@cms/db"
import { Button } from "@cms/ui/button"
export const dynamic = "force-dynamic"
export default async function AdminHomePage() {
const posts = await listPosts()
return (
<main className="mx-auto flex min-h-screen w-full max-w-4xl flex-col gap-8 px-6 py-16">
<header className="space-y-3">
<p className="text-sm uppercase tracking-[0.2em] text-neutral-500">Admin App</p>
<h1 className="text-4xl font-semibold tracking-tight">Content Dashboard</h1>
<p className="text-neutral-600">Manage posts from a dedicated admin surface.</p>
</header>
<section className="rounded-xl border border-neutral-200 p-6">
<div className="mb-4 flex items-center justify-between">
<h2 className="text-xl font-medium">Posts</h2>
<Button>Create post</Button>
</div>
<div className="space-y-3">
{posts.map((post) => (
<article key={post.id} className="rounded-lg border border-neutral-200 p-4">
<div className="flex items-center justify-between gap-3">
<h3 className="text-lg font-medium">{post.title}</h3>
<span className="rounded-full bg-neutral-100 px-3 py-1 text-xs uppercase tracking-wide">
{post.status}
</span>
</div>
<p className="mt-2 text-sm text-neutral-600">{post.slug}</p>
</article>
))}
</div>
</section>
</main>
)
}