From 7aeceee0783736455f55c5b2d930cec62491e930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Tue, 11 Aug 2026 01:54:59 +0200 Subject: [PATCH] feat: unify admin dashboard shell, add logout button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Admin used an undefined `.portal-shell` class plus the landing-page `.masthead` markup, so the layout had no background/min-height and CSS "kackte rein". Generalize PortalShell to take brand/nav props, switch admin/layout.tsx to it (dark portal masthead + BrandLogo + admin nav), and pass the editorial nav from redaktion/layout.tsx so both surfaces share one shell. Add a LogoutButton client component (Better Auth signOut → hard navigate to /anmelden) rendered into the masthead. Style the admin content that had no rules: `.content-section dl/dt/dd` mirrors `.editorial-section dl` (admin detail page), `.editorial-list` mirrors `.billing-editorial-list` (Redaktionen index, replacing browser bullets), `.portal-signout` for the dark masthead. Mobile: meta wraps, dl goes single column. Update logo.test.tsx to PortalShell's new required props. Co-Authored-By: Claude --- src/app/admin/layout.tsx | 28 ++++---- src/app/admin/redaktionen/page.tsx | 2 +- src/app/globals.css | 94 ++++++++++++++++++++++++- src/app/redaktion/layout.tsx | 16 ++++- src/components/brand/logo.test.tsx | 9 ++- src/components/layout/logout-button.tsx | 27 +++++++ src/components/layout/portal-shell.tsx | 42 ++++++++--- 7 files changed, 187 insertions(+), 31 deletions(-) create mode 100644 src/components/layout/logout-button.tsx diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx index 3ea4c6b..996ab65 100644 --- a/src/app/admin/layout.tsx +++ b/src/app/admin/layout.tsx @@ -1,27 +1,25 @@ import type { ReactNode } from "react"; import { headers } from "next/headers"; -import Link from "next/link"; +import { PortalShell } from "@/components/layout/portal-shell"; import { requireAdmin } from "@/modules/auth/principal"; export default async function AdminLayout({ children }: Readonly<{ children: ReactNode }>) { await requireAdmin(new Headers(await headers())); return ( -
-
- - Leon Tonhäuser - - Administration -
- + {children} -
+ ); -} +} \ No newline at end of file diff --git a/src/app/admin/redaktionen/page.tsx b/src/app/admin/redaktionen/page.tsx index c498233..f9030c3 100644 --- a/src/app/admin/redaktionen/page.tsx +++ b/src/app/admin/redaktionen/page.tsx @@ -24,7 +24,7 @@ export default async function EditorialsPage() { {editorials.length === 0 ? (

Noch keine Redaktionen registriert.

) : ( -