feat(ui): overhaul UI/UX with CommandMenu, modern Linear design, interactive TOC, and live preview
CI / typecheck + build (turbo) (push) Canceled after 0s
CI / typecheck + build (turbo) (push) Canceled after 0s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import Link from "next/link";
|
||||
import { listDocuments, extractFoldersForSection } from "@mcpedia/core";
|
||||
import { SECTIONS } from "@mcpedia/config/sections";
|
||||
import { WEBHOOK_SECRET } from "@mcpedia/config";
|
||||
@@ -5,6 +6,8 @@ import { cookies } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
import DocForm from "@/components/DocForm";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function CreatePage() {
|
||||
const cookieStore = await cookies();
|
||||
const isAdmin = cookieStore.get("mcpedia_admin")?.value != null;
|
||||
@@ -14,10 +17,29 @@ export default async function CreatePage() {
|
||||
const docPaths = all.map((d) => d.path);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-6">
|
||||
<span className="text-2xl">✏️</span>
|
||||
<h1 className="text-2xl font-medium text-[#f7f8f8]">Create Document</h1>
|
||||
<div className="space-y-6">
|
||||
{/* Breadcrumb */}
|
||||
<nav className="flex items-center gap-2 text-xs text-[#62666d]">
|
||||
<Link href="/" className="hover:text-[#d0d6e0] transition-colors">
|
||||
MCPedia
|
||||
</Link>
|
||||
<span>/</span>
|
||||
<span className="text-[#8a8f98] font-medium">Create Document</span>
|
||||
</nav>
|
||||
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between pb-4 border-b border-[#1f2022]">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-10 h-10 rounded-lg bg-[#5e6ad2]/15 border border-[#5e6ad2]/30 flex items-center justify-center text-xl text-[#7170ff]">
|
||||
✏️
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-[#f7f8f8] tracking-tight">Create Document</h1>
|
||||
<p className="text-xs text-[#8a8f98] mt-0.5">
|
||||
Writes markdown file to disk, records revision, and computes 2048-dim vector embeddings.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DocForm
|
||||
|
||||
Reference in New Issue
Block a user