feat: manage generic page fallback copy via payload

This commit is contained in:
syntaxbullet
2026-06-22 13:00:02 +02:00
parent b4b4820e46
commit 9cf23552cc
9 changed files with 101 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
import React from 'react'
import { useCmsRoute } from '@/spa/cmsRoute'
import { defaultSiteSettings } from '@/spa/siteSettings'
const NAVY = '#111D55'
const GOLD = '#EFBF04'
@@ -13,14 +14,15 @@ const FB = '"Inter", sans-serif'
export default function CmsGenericPage() {
const route = useCmsRoute()
const doc = route?.doc
const title = doc?.title || doc?.meta?.title || 'Seite'
const siteSettings = route?.siteSettings || defaultSiteSettings
const title = doc?.title || doc?.meta?.title || siteSettings.genericPageTitle
const description = doc?.description || doc?.meta?.description
return (
<main style={{ minHeight: '70vh', background: CREAM, padding: '140px 24px 80px' }}>
<div style={{ maxWidth: 960, margin: '0 auto' }}>
<div style={{ color: GOLD, fontFamily: FF, fontWeight: 800, fontSize: 12, letterSpacing: '0.18em', textTransform: 'uppercase', marginBottom: 20 }}>
{route?.collection || 'CMS'}
{route?.collection || siteSettings.genericPageKicker}
</div>
<h1 style={{ color: NAVY, fontFamily: FF, fontSize: 'clamp(2.25rem, 7vw, 5rem)', lineHeight: 1, fontWeight: 900, textTransform: 'uppercase', margin: 0 }}>
{title}
@@ -31,7 +33,7 @@ export default function CmsGenericPage() {
</p>
) : (
<p style={{ color: 'rgba(58,58,58,0.65)', fontFamily: FB, fontSize: 18, lineHeight: 1.7, marginTop: 28, maxWidth: 760 }}>
Diese Route wird aus Payload CMS geladen. Ergänze Inhalte im entsprechenden Collection-Dokument.
{siteSettings.genericPageDescription}
</p>
)}
</div>