Files
2026-11-23 16:07:12 +00:00

82 lines
2.6 KiB
TypeScript

import type { Metadata } from "next";
import Link from "next/link";
import { GeistMono } from "geist/font/mono";
import { GeistSans } from "geist/font/sans";
import { AppNav } from "./app-nav";
import { MobileMenu } from "./mobile-menu";
import { ThemeToggle } from "./theme-toggle";
import "./globals.css";
export const metadata: Metadata = {
title: "Courier",
description: "Transaktionsmail für hubsport.club",
robots: { index: false, follow: false },
};
const themeScript = `try {
var t = localStorage.getItem('courier-theme');
if (!t) t = matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
document.documentElement.dataset.theme = t;
document.documentElement.classList.toggle('dunkel', t === 'dark');
} catch (e) {}`;
export default function RootLayout({ children }: { children: React.ReactNode }) {
const basePath = process.env.NEXT_BASE_PATH || "";
return (
<html lang="de" data-dichte="weit" className={`${GeistSans.variable} ${GeistMono.variable}`} suppressHydrationWarning>
<body>
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
<a className="ds-skip" href="#inhalt">
Zum Inhalt
</a>
<div className="app-shell">
<aside className="app-sidebar">
<div className="app-sidebar__top">
<Link className="app-brand marke" href="/">
<span className="marke-logo">
<img src={`${basePath}/marke/aimighty-hell.svg`} alt="AImighty" width={472} height={167} className="marke-logo-bild hell" />
<img src={`${basePath}/marke/aimighty-dunkel.svg`} alt="" aria-hidden="true" width={472} height={167} className="marke-logo-bild dunkel" />
</span>
<span className="marke-produkt">Courier</span>
</Link>
<AppNav />
</div>
<div className="app-sidebar__footer">
<div className="app-sidebar__status">
<span className="app-sidebar__dot" aria-hidden="true" />
Amazon SES
</div>
<ThemeToggle />
</div>
</aside>
<div className="app-content">
<header className="app-mobilebar">
<div className="app-mobilebar__row">
<Link className="app-brand marke" href="/">
<span className="marke-logo">
<img src={`${basePath}/marke/aimighty-hell.svg`} alt="AImighty" width={472} height={167} className="marke-logo-bild hell" />
<img src={`${basePath}/marke/aimighty-dunkel.svg`} alt="" aria-hidden="true" width={472} height={167} className="marke-logo-bild dunkel" />
</span>
<span className="marke-produkt">Courier</span>
</Link>
<div className="app-mobilebar__actions">
<ThemeToggle />
<MobileMenu />
</div>
</div>
</header>
<main id="inhalt" className="app-main">
{children}
</main>
</div>
</div>
</body>
</html>
);
}