Files
crosscode-platform/apps/accounts/frontend/src/app/layout.tsx
T
joshuaandClaude Opus 5.5 f202a5a88e Accounts 1.0.0 frontend and @crosscode/ui
Sign-in steps (password, sign-up, email code, two-step sign-in and its
setup with recovery codes, privacy notice, news question), forgot and
reset password, the account page, admin (people, deletions, church
profile, linked products, settings, notice, licence, audit) and setup.
Strict CSP with a nonce per page; church colours from the profile.
@crosscode/ui gets its first components (shell, card, fields, buttons).
Plan: roles stay in each product (asked 2026-11-18).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:42:45 +02:00

30 lines
1.1 KiB
TypeScript

import type { Metadata } from "next";
import { headers } from "next/headers";
import "./globals.css";
import { BrandingProvider } from "@/components/BrandingProvider";
import { loadBranding, rgbVars } from "@/lib/branding";
export async function generateMetadata(): Promise<Metadata> {
const b = await loadBranding();
// Sign-in pages never belong in search results (ROADMAP-v3 §11).
return { title: { default: `Sign in · ${b.name}`, template: `%s · ${b.name}` }, robots: { index: false, follow: false } };
}
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const nonce = (await headers()).get("x-nonce") ?? undefined;
const b = await loadBranding();
const vars = rgbVars(b.colours.primary);
return (
<html lang="en-ZA">
<head>
<style nonce={nonce}>{`:root{--brand:${vars.brand};--brand-dark:${vars.dark}}`}</style>
</head>
<body>
<BrandingProvider value={{ name: b.name, shortName: b.shortName, logoUrl: b.logoUrl, signupEnabled: b.signupEnabled, setupNeeded: b.setupNeeded }}>
{children}
</BrandingProvider>
</body>
</html>
);
}