Website 1.6.0: real photos for the demo church, photos sized to their frames

The demo church (and the eight demo profiles) used one generated "hills and
sun" SVG for every picture. Now 104 Unsplash stock photos (models; free under
the Unsplash License, credited in backend/demo-photos/CREDITS.md): a set per
profile, a portrait for every leader (before: only the pastor), a picture for
each event, and a photo for each message instead of the stand-in video's
thumbnail. Demo photos go through processImage like an upload, made once per
machine and copied; without demo-photos/ the illustration still stands in.

A message's thumbnailUrl that is one of the site's own uploads now comes
before the YouTube thumbnail; admins and the YouTube feed store YouTube's
address there, so a church's own messages are unchanged.

Faster on phones: the Community collage hero, the collage row, the team's
portraits and the ministry cards give the browser their real width (sizes),
so a phone no longer fetches the full-width photo for a small frame.

Checked: backend tests (131), Website e2e (130, baselines retaken;
Lighthouse mobile 90-98 performance, 100 accessibility and SEO), typecheck,
lint and both builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 14:31:57 +02:00
co-authored by Claude Opus 5.5
parent 28085d92ba
commit 2d4d9ea871
120 changed files with 1401 additions and 60 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@crosscode/website-frontend",
"version": "1.5.0",
"version": "1.6.0",
"private": true,
"description": "Church Website: the church's public site in its template, and the admin",
"scripts": {
@@ -112,9 +112,10 @@ export function Hero({ section, site, template }: SectionProps) {
<Words d={d} />
<div className="relative mx-auto h-80 w-full max-w-md sm:h-96" aria-hidden={three.every((x) => !x) ? "true" : undefined}>
<div className="absolute -right-10 top-4 h-72 w-72 rounded-full bg-accent/30 blur-2xl" aria-hidden="true" />
<Img image={three[0]} priority ratio="" className="absolute left-0 top-0 h-56 w-56 rotate-[-4deg] rounded-[2rem] shadow-xl sm:h-64 sm:w-64" />
<Img image={three[1]} ratio="" className="absolute bottom-0 left-16 h-44 w-44 rotate-[3deg] rounded-[2rem] shadow-xl sm:h-52 sm:w-52" />
<Img image={three[2]} ratio="" className="absolute right-0 top-16 h-40 w-40 rotate-[6deg] rounded-full shadow-xl sm:h-48 sm:w-48" />
{/* Small fixed frames: `sizes` says so, or a phone fetches the full-width photo for each. */}
<Img image={three[0]} priority sizes="(min-width: 640px) 16rem, 14rem" ratio="" className="absolute left-0 top-0 h-56 w-56 rotate-[-4deg] rounded-[2rem] shadow-xl sm:h-64 sm:w-64" />
<Img image={three[1]} sizes="(min-width: 640px) 13rem, 11rem" ratio="" className="absolute bottom-0 left-16 h-44 w-44 rotate-[3deg] rounded-[2rem] shadow-xl sm:h-52 sm:w-52" />
<Img image={three[2]} sizes="(min-width: 640px) 12rem, 10rem" ratio="" className="absolute right-0 top-16 h-40 w-40 rotate-[6deg] rounded-full shadow-xl sm:h-48 sm:w-48" />
</div>
</div>
</section>
@@ -125,7 +126,7 @@ export function Hero({ section, site, template }: SectionProps) {
<div className="cc-wrap">
{template === "clean" && <div className="mb-10 max-w-3xl"><Words d={d} /></div>}
<div className="grid grid-cols-3 gap-3 sm:gap-4">
{three.map((im, i) => <Img key={i} image={im} priority={i === 0} ratio={template === "heritage" ? "aspect-[3/4]" : "aspect-square"} />)}
{three.map((im, i) => <Img key={i} image={im} priority={i === 0} sizes="(min-width: 1280px) 400px, 33vw" ratio={template === "heritage" ? "aspect-[3/4]" : "aspect-square"} />)}
</div>
{template !== "clean" && <div className="mx-auto mt-10 max-w-3xl"><Words d={d} centred /></div>}
</div>
@@ -187,7 +187,7 @@ function Ministries(p: SectionProps) {
<ul className={cx("grid gap-6", list.length > 3 ? "sm:grid-cols-2 lg:grid-cols-4" : "sm:grid-cols-3")}>
{list.map((m) => (
<li key={m.slug} className="cc-card flex flex-col">
<Img image={m.image} ratio="aspect-[4/3]" className="rounded-none" />
<Img image={m.image} sizes={list.length > 3 ? "(min-width: 1024px) 25vw, (min-width: 640px) 50vw, 100vw" : "(min-width: 640px) 33vw, 100vw"} ratio="aspect-[4/3]" className="rounded-none" />
<div className="flex flex-1 flex-col p-5">
<h3 className="cc-h3">{m.name}</h3>
{m.summary && <p className={cx("mt-2 flex-1", p.template === "bold" ? "text-white/80" : "cc-muted")}>{m.summary}</p>}
@@ -210,7 +210,7 @@ function Team(p: SectionProps) {
const head = <SectionHeading heading={d.heading ?? "Our team"} intro={d.intro} centred={p.template !== "clean"} />;
const face = (l: (typeof people)[number], big = false) => (
<figure key={l.name} className="text-center">
<Img image={l.photo} ratio={p.template === "bold" ? "aspect-[3/4]" : "aspect-square"}
<Img image={l.photo} sizes={big ? "20rem" : "12rem"} ratio={p.template === "bold" ? "aspect-[3/4]" : "aspect-square"}
className={cx(p.template === "heritage" || p.template === "community" ? "rounded-full" : "", big ? "mx-auto max-w-xs" : "mx-auto max-w-[12rem]")} />
<figcaption className="mt-4">
<span className={cx("block font-heading font-semibold", big ? "text-2xl" : "text-lg")}>{l.name}</span>