From f4b6a41f832782db9e32efa2d9b55b6322b006cf Mon Sep 17 00:00:00 2001 From: Joshua Oosthuizen Date: Tue, 24 Nov 2026 23:29:23 +0200 Subject: [PATCH] Events 3.7.0 + @crosscode/ui 0.3.0: the church's fonts, corners and footer on the public pages - Backend: the church profile from Accounts (src/accounts/church.ts, kept 10 minutes, last copy kept while Accounts is down), public GET /api/v2/church, and church.changed accepted at POST /api/church/v1/changed (signed with the Accounts link; it answered 404 before). - Frontend: brandAttributes on , @crosscode/ui/fonts.css, body and h1-h3 use the church's pairing, --radius follows its corners; the dashboard and setup screens (data-cc-staff) keep their fonts and 0.5rem. - The shared ChurchFooter on public pages when Accounts is connected (terms and cookie settings below it); header links to the church's other sites. - @crosscode/ui 0.3.0: ChurchFooter takes `bottom`. - Tests: tests/churchProfile.test.ts (8); e2e/church-brand.spec.ts and a /test/profile hook on the e2e Accounts. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 10 + apps/events/CHANGELOG.md | 32 + apps/events/WHATS-NEW.md | 8 + apps/events/backend/package.json | 2 +- apps/events/backend/src/accounts/church.ts | 67 ++ apps/events/backend/src/links/routes.ts | 23 +- apps/events/backend/src/v2/index.ts | 1 + .../events/backend/src/v2/resources/church.ts | 23 + .../backend/tests/churchProfile.test.ts | 140 ++++ apps/events/e2e/church-brand.spec.ts | 117 ++++ apps/events/e2e/support/accounts-server.mts | 17 +- apps/events/frontend/next.config.ts | 2 + apps/events/frontend/package.json | 3 +- .../frontend/src/app/dashboard/layout.tsx | 10 +- apps/events/frontend/src/app/globals.css | 27 +- apps/events/frontend/src/app/layout.tsx | 12 +- apps/events/frontend/src/app/setup/page.tsx | 2 +- .../frontend/src/components/layout/Footer.tsx | 51 +- .../frontend/src/components/layout/Navbar.tsx | 11 + .../frontend/src/contexts/ChurchContext.tsx | 13 + .../frontend/src/lib/api-v2/openapi.json | 642 ++++++++++++++++++ .../frontend/src/lib/api-v2/schema.d.ts | 125 ++++ apps/events/frontend/src/lib/serverChurch.ts | 19 + apps/events/frontend/tailwind.config.js | 4 + apps/events/package.json | 2 +- docs/HANDOVER.md | 6 +- docs/VERSIONS.md | 9 +- package-lock.json | 11 +- packages/ui/package.json | 2 +- packages/ui/src/brand.tsx | 10 +- 30 files changed, 1359 insertions(+), 42 deletions(-) create mode 100644 apps/events/backend/src/accounts/church.ts create mode 100644 apps/events/backend/src/v2/resources/church.ts create mode 100644 apps/events/backend/tests/churchProfile.test.ts create mode 100644 apps/events/e2e/church-brand.spec.ts create mode 100644 apps/events/frontend/src/contexts/ChurchContext.tsx create mode 100644 apps/events/frontend/src/lib/serverChurch.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index d910964..7962e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ Each package and app has its own section and its own tags (`contracts@1.0.0`, `accounts@1.0.0`, …). +## events@3.7.0 + @crosscode/ui 0.3.0 - 2026-11-24 + +Cross Events' public pages use the church's brand style and the shared footer (WEBSITE-1.0-PLAN §9). +Details in `apps/events/CHANGELOG.md`. + +- **Events 3.7.0:** the church profile from Accounts (`GET /api/v2/church`), its fonts and corners + on the public pages, `ChurchFooter` and links to the church's other sites; `church.changed` is + accepted at `/api/church/v1/changed`. Dashboard and setup unchanged. No migrations. +- **`@crosscode/ui` 0.3.0:** `ChurchFooter` takes `bottom` (a product's own links). + ## contracts@1.17.0 + accounts@1.7.0 + @crosscode/ui 0.2.0 - 2026-11-24 The first release of the Church Website 1.0.0 work (WEBSITE-1.0-PLAN §12). The contracts are diff --git a/apps/events/CHANGELOG.md b/apps/events/CHANGELOG.md index 38fd760..072dd93 100644 --- a/apps/events/CHANGELOG.md +++ b/apps/events/CHANGELOG.md @@ -5,6 +5,38 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project follows [Semantic Versioning](https://semver.org/). +## [3.7.0] - 2026-11-24 + +The church's look from its Accounts (docs/WEBSITE-1.0-PLAN.md §9). Works with any Accounts: the +brand style needs Accounts 1.7.0 (with an older one the pages keep their fonts and only the footer +changes). No migrations, no new settings. + +### Added + +- **The church's fonts and corners on the public pages.** The backend reads the church profile from + Accounts (`GET /api/church/v1`, kept for 10 minutes; `src/accounts/church.ts`) and the public + pages get it from the new `GET /api/v2/church` (public). `` gets `brandAttributes(style)` + from `@crosscode/ui` and the root layout imports `@crosscode/ui/fonts.css` (self-hosted, so no + font is loaded from another site). Body text and h1–h3 use `--cc-font-body` and + `--cc-font-heading` when the church picked a pairing, and `--radius` follows the corner style + (`soft` is 0.5rem, the same as before). The dashboard and setup screens (`data-cc-staff`) keep + the system fonts and 0.5rem. +- **`church.changed` from Accounts** at `POST /api/church/v1/changed` (signed with the Accounts + link, `LINK_HEADERS`): the profile is fetched again on the next page. Before 3.7.0 this answered + 404 and Accounts kept retrying for a week. +- **The shared church footer** (`ChurchFooter`, `@crosscode/ui` 0.3.0) on the public pages when + Accounts is connected: name and logo, service times, address, contact, social links and links + to the church's other sites and the privacy notice, with Terms of Use and cookie settings below. + Without Accounts, and on the dashboard (`