91244a5a2b
Brings the catalog to nine. Each is a single scoped [data-theme="..."] CSS file plus a registry entry — no markup changes. - ps1: charcoal BIOS, gray panels, uppercase letterspacing - ps3: animated XMB sky gradient + drifting wave, black glass - wii: white channels, rounded pills, soft blue glow - nds: silver shell with content framed as the touch screen - dreamcast: cream BIOS, conic-gradient orange swirl, lowercase blue - jv2002: dense boxy portal, Verdana 11px, red masthead, blue nav tabs Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import type { ReactNode } from "react";
|
|
import Link from "next/link";
|
|
import { requireAdmin } from "@/lib/auth";
|
|
import { logoutAction } from "../actions";
|
|
|
|
// Guarded chrome for every authenticated admin page. Login lives outside this
|
|
// group so it never inherits the nav or the auth gate.
|
|
export default async function PanelLayout({
|
|
children,
|
|
}: {
|
|
children: ReactNode;
|
|
}) {
|
|
await requireAdmin();
|
|
|
|
return (
|
|
<div className="rb-admin-shell">
|
|
<header className="rb-admin-bar">
|
|
<Link href="/admin" className="rb-admin-brand">
|
|
RetroBlog Admin
|
|
</Link>
|
|
<nav className="rb-admin-nav">
|
|
<Link href="/admin">Dashboard</Link>
|
|
<Link href="/admin/posts">Posts</Link>
|
|
<Link href="/admin/settings">Settings</Link>
|
|
<Link href="/" target="_blank">
|
|
View site ↗
|
|
</Link>
|
|
</nav>
|
|
<form action={logoutAction} className="rb-admin-logout">
|
|
<button className="rb-btn rb-btn-ghost" type="submit">
|
|
Sign out
|
|
</button>
|
|
</form>
|
|
</header>
|
|
<main className="rb-admin-main">{children}</main>
|
|
</div>
|
|
);
|
|
}
|