Add data-driven public pages (home, news, profile)

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.
This commit is contained in:
Simo committed 2026-06-27 16:42:59 +02:00
1 parent 8fca407f0f
commit 6e34d485d4
9 files changed
+327 -7

No files matched your search

+6 -1
View File
@@ -1,5 +1,7 @@
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",
@@ -9,7 +11,10 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
<body>
<SiteNav />
<div className="container">{children}</div>
</body>
</html>
);
}