Files
crosscode-platform/apps/website/frontend/src/site/Shell.tsx
T
joshuaandClaude Opus 5.5 5ed7201efa feat(website): the four templates and the public site
Heritage, Bold, Community and Clean drawing all 26 section variants
with their headers, homepage order and style settings; colours made
safe (WCAG AA) by the backend; fonts and corners from the shared brand
style. Publishing into numbered versions, the content API with live
messages and events and the church profile from Accounts, uploads,
every page kind, simple event pages, Coming soon, 404, sitemap, SEO
basics and the church's JSON-LD. The demo church (npm run demo) and
Playwright e2e: every template's pages pass axe and the SEO checks.
website.sh builds packages/seo. Decision 17 (first Owner) recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:59:03 +02:00

38 lines
1.7 KiB
TypeScript

/** Every public page: the template's header, the page, and the shared church footer (§9). */
import { ChurchFooter } from "@crosscode/ui";
import { Header } from "./Header";
import { t } from "./load";
import type { Published } from "./types";
export function Shell({ site, path, children }: { site: Published; path: string; children: React.ReactNode }) {
const template = site.snapshot.design.template;
const terms = site.snapshot.pages.find((p) => p.kind === "terms");
const safeguarding = site.snapshot.pages.find((p) => p.kind === "safeguarding");
return (
<>
<a href="#main" className="sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded focus:bg-white focus:px-4 focus:py-2 focus:text-gray-900">Skip to the content</a>
<Header site={site} path={path} />
<main id="main">{children}</main>
{site.church && (
<ChurchFooter
church={site.church}
current="website"
privacyUrl={`${site.church.links.accounts.replace(/\/+$/, "")}/privacy`}
className={t(template, {
heritage: "border-t-4 border-double border-brand-text/30 bg-brand-tint/60",
bold: "border-0 bg-gray-950 text-gray-300 [&_h2]:text-white [&_a:hover]:text-white",
community: "border-0 bg-brand-tint",
clean: "border-gray-200 bg-white",
})}
bottom={(terms || safeguarding) && (
<>
{terms && <a href={terms.path} className="hover:underline">{terms.navLabel}</a>}
{safeguarding && <a href={safeguarding.path} className="hover:underline">{safeguarding.navLabel}</a>}
</>
)}
/>
)}
</>
);
}