2026-02-14 00:59:57 +01:00
|
|
|
/**
|
|
|
|
|
* Root layout — site header with portfolio-style navigation.
|
|
|
|
|
* Shows all subpages + standalone albums as nav links.
|
|
|
|
|
*/
|
2026-02-13 23:26:37 +01:00
|
|
|
|
2026-02-14 00:59:57 +01:00
|
|
|
import type { Metadata } from 'next';
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
import './globals.css';
|
|
|
|
|
import { SubpageNav } from '@/components/SubpageNav';
|
2026-02-14 11:47:26 +01:00
|
|
|
import { ThemeToggle } from '@/components/ThemeToggle';
|
|
|
|
|
import { ScrollToTop } from '@/components/ScrollToTop';
|
|
|
|
|
import { Footer } from '@/components/Footer';
|
2026-02-13 23:26:37 +01:00
|
|
|
|
2026-02-14 10:30:27 +01:00
|
|
|
const siteTitle = process.env.SITE_TITLE || 'Gallery';
|
|
|
|
|
const siteDescription = 'A curated photography portfolio';
|
|
|
|
|
|
2026-02-13 23:26:37 +01:00
|
|
|
export const metadata: Metadata = {
|
2026-02-14 10:30:27 +01:00
|
|
|
title: siteTitle,
|
|
|
|
|
description: siteDescription,
|
|
|
|
|
openGraph: {
|
|
|
|
|
title: siteTitle,
|
|
|
|
|
description: siteDescription,
|
|
|
|
|
type: 'website',
|
|
|
|
|
images: [`/api/og?title=${encodeURIComponent(siteTitle)}`],
|
|
|
|
|
},
|
|
|
|
|
twitter: {
|
|
|
|
|
card: 'summary_large_image',
|
|
|
|
|
title: siteTitle,
|
|
|
|
|
description: siteDescription,
|
|
|
|
|
images: [`/api/og?title=${encodeURIComponent(siteTitle)}`],
|
|
|
|
|
},
|
2026-02-13 23:26:37 +01:00
|
|
|
};
|
|
|
|
|
|
2026-02-14 11:47:26 +01:00
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
2026-02-13 23:26:37 +01:00
|
|
|
return (
|
2026-02-14 11:47:26 +01:00
|
|
|
<html lang="en" suppressHydrationWarning>
|
2026-02-14 00:59:57 +01:00
|
|
|
<body>
|
|
|
|
|
<header className="header">
|
|
|
|
|
<nav className="header__nav">
|
|
|
|
|
<Link href="/" className="header__nav-link">
|
|
|
|
|
Home
|
|
|
|
|
</Link>
|
|
|
|
|
<SubpageNav />
|
2026-02-14 10:30:27 +01:00
|
|
|
<Link href="/about" className="header__nav-link">
|
|
|
|
|
About
|
|
|
|
|
</Link>
|
2026-02-14 11:47:26 +01:00
|
|
|
<ThemeToggle />
|
2026-02-14 00:59:57 +01:00
|
|
|
</nav>
|
|
|
|
|
</header>
|
|
|
|
|
<main className="main">{children}</main>
|
2026-02-14 11:47:26 +01:00
|
|
|
<Footer />
|
|
|
|
|
<ScrollToTop />
|
2026-02-13 23:26:37 +01:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|