2026-08-19 17:40:14 +07:00
|
|
|
import type { Metadata } from "next";
|
|
|
|
|
import "./globals.css";
|
2026-08-21 11:07:52 +07:00
|
|
|
import Header from "@/components/Header";
|
2026-08-20 16:57:30 +07:00
|
|
|
import Sidebar from "@/components/Sidebar";
|
2026-08-22 14:55:19 +07:00
|
|
|
import Link from "next/link";
|
2026-08-22 15:12:00 +07:00
|
|
|
import { Database } from "lucide-react";
|
2026-08-19 17:40:14 +07:00
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
2026-08-22 15:12:00 +07:00
|
|
|
title: "MCPedia — Archival Knowledge Base for Humans & AI Agents",
|
2026-08-20 16:57:30 +07:00
|
|
|
description:
|
2026-08-22 15:12:00 +07:00
|
|
|
"A content-first knowledge base. Humans read the Web UI; AI agents use the Model Context Protocol (MCP). Both share one Core.",
|
2026-08-19 17:40:14 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function RootLayout({
|
|
|
|
|
children,
|
2026-08-21 10:29:35 +07:00
|
|
|
}: Readonly<{
|
2026-08-19 17:40:14 +07:00
|
|
|
children: React.ReactNode;
|
2026-08-21 10:29:35 +07:00
|
|
|
}>) {
|
2026-08-19 17:40:14 +07:00
|
|
|
return (
|
2026-08-21 11:13:05 +07:00
|
|
|
<html lang="en" className="h-full scroll-smooth" suppressHydrationWarning>
|
|
|
|
|
<head>
|
|
|
|
|
<script
|
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
|
__html: `
|
|
|
|
|
(function() {
|
|
|
|
|
try {
|
|
|
|
|
var stored = localStorage.getItem('mcpedia-theme');
|
|
|
|
|
var isDark = stored === 'dark' || (stored === null && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
|
|
|
if (isDark) {
|
|
|
|
|
document.documentElement.classList.add('dark');
|
|
|
|
|
} else {
|
|
|
|
|
document.documentElement.classList.remove('dark');
|
|
|
|
|
}
|
|
|
|
|
} catch(e) {}
|
|
|
|
|
})();
|
|
|
|
|
`,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</head>
|
2026-08-22 15:12:00 +07:00
|
|
|
<body className="min-h-screen bg-[var(--bg-app)] text-[var(--text-secondary)] font-sans antialiased selection:bg-[var(--text-primary)] selection:text-[var(--bg-app)] flex flex-col transition-colors duration-150">
|
2026-08-21 10:29:35 +07:00
|
|
|
<div hidden>
|
|
|
|
|
<div id="a11y-live-region" aria-live="polite" aria-atomic="true" />
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-08-21 11:07:52 +07:00
|
|
|
<Header />
|
2026-08-20 16:57:30 +07:00
|
|
|
|
2026-08-22 15:12:00 +07:00
|
|
|
<div className="mx-auto max-w-7xl w-full flex-1 flex flex-col">
|
2026-08-21 11:07:52 +07:00
|
|
|
<div className="flex flex-1">
|
2026-08-22 17:59:32 +07:00
|
|
|
<aside className="no-print hidden lg:block w-72 shrink-0 border-r border-[var(--border-color)] sticky top-14 h-[calc(100vh-3.5rem)] overflow-y-auto bg-[var(--bg-app)]">
|
2026-08-20 16:57:30 +07:00
|
|
|
<Sidebar />
|
|
|
|
|
</aside>
|
|
|
|
|
<main className="flex-1 min-w-0">
|
2026-08-22 17:59:32 +07:00
|
|
|
<div className="px-4 sm:px-8 py-8 sm:py-10 print:p-0 print:m-0 print:max-w-none max-w-4xl mx-auto xl:max-w-5xl">
|
2026-08-20 16:57:30 +07:00
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-08-22 14:55:19 +07:00
|
|
|
|
2026-08-22 15:12:00 +07:00
|
|
|
{/* Global Precision Status Footer */}
|
|
|
|
|
<footer className="no-print border-t border-[var(--border-color)] bg-[var(--bg-surface)] py-4 text-xs text-[var(--text-muted)]">
|
2026-08-22 14:55:19 +07:00
|
|
|
<div className="mx-auto max-w-7xl px-4 sm:px-8 flex flex-col sm:flex-row items-center justify-between gap-3 font-mono">
|
|
|
|
|
<div className="flex items-center gap-2">
|
2026-08-22 15:12:00 +07:00
|
|
|
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500" />
|
|
|
|
|
<span className="text-[var(--text-primary)] font-semibold">MCPedia</span>
|
|
|
|
|
<span className="text-[var(--border-color)]">/</span>
|
|
|
|
|
<span>PostgreSQL 16 Core</span>
|
|
|
|
|
<span className="text-[var(--border-color)]">/</span>
|
|
|
|
|
<span>pgvector</span>
|
2026-08-22 14:55:19 +07:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex items-center gap-4 text-[11px] text-[var(--text-muted)]">
|
2026-08-22 15:12:00 +07:00
|
|
|
<Link href="/search" className="hover:text-[var(--text-primary)] transition-colors">
|
2026-08-22 14:55:19 +07:00
|
|
|
RRF Hybrid Search
|
|
|
|
|
</Link>
|
|
|
|
|
<span>·</span>
|
2026-08-22 15:12:00 +07:00
|
|
|
<Link href="/export/pdf" className="hover:text-[var(--text-primary)] transition-colors">
|
2026-08-22 14:55:19 +07:00
|
|
|
Publication PDF
|
|
|
|
|
</Link>
|
|
|
|
|
<span>·</span>
|
2026-08-22 15:12:00 +07:00
|
|
|
<span>HTTP :4021</span>
|
2026-08-22 14:55:19 +07:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</footer>
|
2026-08-19 17:40:14 +07:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|