- next dev/start binden jetzt explizit an 0.0.0.0 statt nur localhost (Docker war über die Port-Freigabe bereits erreichbar, jetzt auch beim nativen npm-Betrieb); docker-compose.yml macht das Binden an alle Interfaces zusätzlich explizit - package.json-Name, Docker-Image/Container/Netzwerk-Namen, lokaler DB-Name (canteen_menu), Browser-Tab-Titel und README auf den englischen Projektnamen "canteen-menu" umgestellt; deutsche In-App-Texte für die Kantinen-Mitarbeiter bleiben unverändert - Supabase-Projekt (Anzeigename) und native lokale Postgres-DB entsprechend umbenannt (Ref/URL/Keys unverändert)
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist } from "next/font/google";
|
|
import "./globals.css";
|
|
import { createClient } from "@/lib/supabase/server";
|
|
import { COLOR_VARS, DEFAULT_COLORS } from "@/lib/types";
|
|
|
|
// Farben/Logo sollen Änderungen sofort widerspiegeln.
|
|
export const dynamic = "force-dynamic";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Canteen Menu",
|
|
description: "Speisekarte der Betriebskantine",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const supabase = await createClient();
|
|
const { data: settings } = await supabase
|
|
.from("settings")
|
|
.select("colors")
|
|
.eq("id", 1)
|
|
.maybeSingle();
|
|
|
|
const colors: Record<string, string> = {
|
|
...DEFAULT_COLORS,
|
|
...((settings?.colors as Record<string, string>) ?? {}),
|
|
};
|
|
const style = Object.fromEntries(
|
|
Object.entries(COLOR_VARS).map(([key, cssVar]) => [cssVar, colors[key]])
|
|
) as React.CSSProperties;
|
|
|
|
return (
|
|
<html lang="de" className={`${geistSans.variable} h-full antialiased`}>
|
|
<body style={style} className="min-h-full flex flex-col">
|
|
{children}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|