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 <html>, @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 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crosscode/ui",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"private": true,
|
||||
"description": "Shared UI for the church's sign-in pages, Website and App: the branded shell, forms and buttons, the church's fonts and footer (Tailwind; apps compile the source with transpilePackages)",
|
||||
"main": "src/index.tsx",
|
||||
|
||||
@@ -57,9 +57,10 @@ export function productLinks(links: FooterChurch["links"], current: FooterProduc
|
||||
/**
|
||||
* One footer for every product: the church's name and logo, service times, address and contact,
|
||||
* social links, links to its other sites, and the privacy notice. Sections without data are left
|
||||
* out. `className` lets a Website template restyle it.
|
||||
* out. `className` lets a Website template restyle it; `bottom` goes after the copyright line (a
|
||||
* product's own links, such as its terms and cookie settings).
|
||||
*/
|
||||
export function ChurchFooter({ church, current, privacyUrl, className }: { church: FooterChurch; current: FooterProduct; privacyUrl?: string | null; className?: string }) {
|
||||
export function ChurchFooter({ church, current, privacyUrl, className, bottom }: { church: FooterChurch; current: FooterProduct; privacyUrl?: string | null; className?: string; bottom?: React.ReactNode }) {
|
||||
const times = church.serviceTimes ?? [];
|
||||
const contact = church.contact;
|
||||
const address = contact?.address;
|
||||
@@ -110,7 +111,10 @@ export function ChurchFooter({ church, current, privacyUrl, className }: { churc
|
||||
</nav>
|
||||
)}
|
||||
</div>
|
||||
<p className="px-4 pb-6 text-center text-xs text-gray-500">© {new Date().getFullYear()} {church.name}</p>
|
||||
<div className="flex flex-wrap items-center justify-center gap-x-4 gap-y-1 px-4 pb-6 text-center text-xs text-gray-500">
|
||||
<p>© {new Date().getFullYear()} {church.name}</p>
|
||||
{bottom}
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user