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>
53 lines
2.8 KiB
TypeScript
53 lines
2.8 KiB
TypeScript
/**
|
|
* Coming soon (WEBSITE-1.0-PLAN §5): until the first publish, the church's details from its
|
|
* profile (logo, service times, address, contact, social), links to its Events and App, and a line
|
|
* the admin can change. `noindex`, a real HTTP 200.
|
|
*/
|
|
import Link from "next/link";
|
|
import { dayName } from "./parts";
|
|
import type { ComingSoon as Content } from "./types";
|
|
|
|
export function ComingSoon({ c, signedInAdmin }: { c: Content; signedInAdmin: boolean }) {
|
|
const church = c.church;
|
|
const a = church?.contact.address;
|
|
const links = church ? ([["Events", church.links.events], ["App", church.links.app]] as const).filter(([, u]) => u) : [];
|
|
return (
|
|
<main className="flex min-h-screen flex-col items-center justify-center bg-brand-tint px-4 py-16 text-center">
|
|
{signedInAdmin && (
|
|
<p className="mb-8 rounded-cc bg-white px-4 py-3 text-sm shadow">
|
|
Your site isn't published yet. <Link href="/admin" className="cc-link font-semibold">Preview it or publish it</Link>.
|
|
</p>
|
|
)}
|
|
{church?.branding.logoUrl
|
|
? <img src={church.branding.logoUrl} alt={church.name} className="mb-8 h-20 w-auto max-w-[16rem] object-contain" />
|
|
: church && <p className="cc-eyebrow mb-4">{church.name}</p>}
|
|
<h1 className="cc-h1 text-brand-text">{church ? `${church.name}: coming soon` : "Coming soon"}</h1>
|
|
<p className="cc-muted mt-4 max-w-xl text-lg">{c.comingSoonText}</p>
|
|
{church && (
|
|
<div className="mt-10 grid w-full max-w-2xl gap-8 rounded-cc bg-white p-8 text-left shadow sm:grid-cols-2">
|
|
{church.serviceTimes.length > 0 && (
|
|
<div>
|
|
<h2 className="cc-h3 mb-2">Service times</h2>
|
|
<ul className="space-y-1">{church.serviceTimes.map((s, i) => <li key={i}>{dayName(s.day)} {s.time}{s.label && <span className="cc-muted"> · {s.label}</span>}</li>)}</ul>
|
|
</div>
|
|
)}
|
|
<div>
|
|
<h2 className="cc-h3 mb-2">Find us</h2>
|
|
{a && <address className="not-italic">{[a.line1, a.line2, a.suburb, a.city].filter(Boolean).join(", ")}</address>}
|
|
<ul className="mt-2 space-y-1">
|
|
{church.contact.phone && <li><a className="cc-link" href={`tel:${church.contact.phone}`}>{church.contact.phone}</a></li>}
|
|
{church.contact.email && <li><a className="cc-link break-all" href={`mailto:${church.contact.email}`}>{church.contact.email}</a></li>}
|
|
{church.social.map((s) => <li key={s.url}><a className="cc-link capitalize" href={s.url} rel="me noopener">{s.network.replace("-", " ")}</a></li>)}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
)}
|
|
{links.length > 0 && (
|
|
<div className="mt-8 flex flex-wrap justify-center gap-3">
|
|
{links.map(([label, url]) => <a key={label} href={url!} className="cc-btn">Our {label}</a>)}
|
|
</div>
|
|
)}
|
|
</main>
|
|
);
|
|
}
|