import { type AppLocale } from '../i18n/locale'; import { ROUTE_IDS, type RouteId } from '../routing/route-ids'; import { type PageCopy, type SiteContent } from './content.contracts'; const PAGE_TITLES: Record> = { home: { de: 'Startseite', en: 'Home' }, services: { de: 'Leistungen', en: 'Services' }, servicesSoftware: { de: 'Software', en: 'Software' }, servicesHardwareNetwork: { de: 'Hardware und Netzwerk', en: 'Hardware and network' }, servicesClusters: { de: 'Cluster', en: 'Clusters' }, servicesAi: { de: 'KI-Integration', en: 'AI integration' }, projects: { de: 'Projekte', en: 'Projects' }, stack: { de: 'Stack', en: 'Stack' }, about: { de: 'Über mich', en: 'About' }, contact: { de: 'Kontakt', en: 'Contact' }, imprint: { de: 'Impressum', en: 'Legal notice' }, privacy: { de: 'Datenschutz', en: 'Privacy' }, notFound: { de: 'Seite nicht gefunden', en: 'Page not found' }, }; function scaffoldPage(routeId: RouteId, locale: AppLocale): PageCopy { const title = PAGE_TITLES[routeId][locale]; const description = locale === 'de' ? 'Diese Seite wird derzeit aufgebaut.' : 'This page is being built.'; return { routeId, title, description, hero: { headline: title, body: [description], }, sections: [], ctas: routeId === 'notFound' ? [ { label: locale === 'de' ? 'Zur Startseite' : 'Back to home', routeId: 'home', }, ] : [], }; } function pagesFor(locale: AppLocale): SiteContent { const pages = Object.fromEntries( ROUTE_IDS.map((routeId) => [routeId, scaffoldPage(routeId, locale)]), ) as Record; return { pages }; } export const PLACEHOLDER_CONTENT: Record = { de: pagesFor('de'), en: pagesFor('en'), };