/** @jsxRuntime automatic */ /** @jsxImportSource remix/component */ import type { RemixNode } from 'remix/component' import type { SocialPlatform } from '../../src/domain/types.ts' import { routes } from '../routes.ts' import type { Site } from '../data/site.ts' import { icon, socialLabels } from './icons.tsx' export type PageMeta = { /** Page title; the site name is appended. Omit on the home page. */ title?: string description?: string /** Absolute Open Graph image URL. */ image?: { url: string; width: number; height: number; alt: string } /** Absolute canonical URL. */ canonical: string nav?: 'home' | 'galleries' | 'about' | 'contact' /** Never index (preview, contact confirmation, 404). */ noindex?: boolean } function navLink(href: string, label: string, current: boolean) { return ( {label} ) } /** Full HTML page: head (SEO + Open Graph), header, footer, preview banner, lightbox client. */ export function documentPage(site: Site, meta: PageMeta, children: RemixNode) { const { config } = site.content const title = meta.title ? `${meta.title} · ${config.siteName}` : `${config.siteName} · ${config.tagline}` const description = meta.description || config.seoDescription const socials = Object.entries(config.social) as Array< [SocialPlatform, string] > const year = new Date().getUTCFullYear() return (