Real App Router pages reading the converted Prisma models: - home: latest 4 articles (websiteArticles) + hotel_name from settings - /news + /news/[slug]: article index and detail - /u/[username]: profile (avatar via imager helper, motto, rank, credits, online) - shared SiteNav (reads session via auth() + hotel_name), globals.css - src/lib/format.ts: avatarImageUrl + excerpt helpers (unit-tested) Verified: tsc exit 0, vitest 43/43, next build exit 0 (7 routes). Pages render against a live DB (deferred until DATABASE_URL is provided). i18n to be layered on next.
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
import type { Metadata } from "next";
|
|
import type { ReactNode } from "react";
|
|
import { SiteNav } from "@/components/site-nav";
|
|
import "./globals.css";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "AtomCMS",
|
|
description: "AtomCMS — retro hotel CMS (Next.js conversion)",
|
|
};
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html lang="en">
|
|
<body>
|
|
<SiteNav />
|
|
<div className="container">{children}</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|