website: read legal pages + footer from unom-cms
Build & Deploy unom website / build (push) Successful in 11s
Build & Deploy unom website / deploy (push) Successful in 4s

- Add src/lib/cms.ts: REST helpers (findPageBySlug, findFooter, findHeader)
- Add src/components/RichText.tsx: minimal Lexical → React renderer
  (heading h1-h4, paragraph, list, listitem, link, text + linebreaks +
  basic text-format bitflags).
- routes/legal/{imprint,privacy}.tsx now fetch via route loader; meta
  title + description come from the Page's own fields.
- Footer reads the Footer global via the root route's loader using
  getRouteApi('__root__'). Three sections + tagline match the previously
  hardcoded structure (now editable via cms.unom.io/admin).
- Drop react-markdown + src/content/legal/*.md (CMS is the source of truth).
This commit is contained in:
2026-05-26 18:50:10 +02:00
parent ce63faa8f3
commit 42a47cd2ab
10 changed files with 234 additions and 404 deletions
-1
View File
@@ -25,7 +25,6 @@
"nitro": "^3.0.260429-beta",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-markdown": "^9.0.3",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.0"
},