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
+30 -1
View File
@@ -32,7 +32,7 @@ export type DemoSeed = {
visit: { expect: string; kids: string; cta: string };
about: { story: string; quote: string; by: string };
give: string;
/** Four: [slug, name, summary]. Their pictures are the kids, youth, music and care illustrations, in order. */
/** Four: [slug, name, summary]. Their pictures are `photos.ministries`, in order. */
ministries: [string, string, string][];
/** Four: [name, role]. The first is the pastor on the home page and the speaker of the messages. */
leaders: [string, string][];
@@ -43,6 +43,27 @@ export type DemoSeed = {
events: [string, string, number, string][];
/** Where the events are. */
venue: string;
/** The photos (keys in `demo-photos/photos.json`): the hero, the collage's other two, and the rest. */
photos: DemoPhotos;
};
/**
* Which demo photo goes where. `ministries` follow the ministries' order; the first is also the
* picture on the Plan your visit page's "Bringing children". The pastor's photo is the first leader's.
*/
export type DemoPhotos = {
hero: string;
collage: [string, string];
welcome: string;
pastor: string;
invite: string;
ministries: [string, string, string, string];
/** The other three leaders' portraits, in the leaders' order. */
team: [string, string, string];
/** The three messages' thumbnails (their video is a stand-in), newest first. */
messages: [string, string, string];
/** The three events' pictures, in the events' order. */
events: [string, string, string];
};
const visitButton: Button = { label: 'Plan your visit', href: '/visit' };
@@ -82,6 +103,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['christmas-eve', 'Christmas Eve midnight mass', 27, 'The first Communion of Christmas, with carols from 23:15.'],
],
venue: '{name}',
photos: { hero: 'stone-church', collage: ['church-aisle', 'organ'], welcome: 'congregation-pews', pastor: 'pastor-margaret', invite: 'church-light', ministries: ['kids-drawing', 'candles', 'choir-church', 'visit-tea'], team: ['team-sipho', 'team-anne', 'team-david'], messages: ['sermon-collar', 'pulpit', 'church-quiet'], events: ['friends-picnic', 'candles', 'church-light'] },
},
'heritage-city': {
id: 'heritage-city', template: 'heritage', label: 'Heritage: a city-centre church with weekday services', alternate: true,
@@ -117,6 +139,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['city-carols', 'Carols for the city', 23, 'Readings and carols for everyone who works in {city}.'],
],
venue: '{name}',
photos: { hero: 'city-spire', collage: ['candles', 'congregation-pews'], welcome: 'church-white', pastor: 'pastor-peter', invite: 'church-doors', ministries: ['students-lecture', 'coffee-group', 'organ', 'soup-bowl'], team: ['team-claire', 'team-tom', 'team-nomsa'], messages: ['sermon-robe', 'pulpit', 'open-bible'], events: ['organ', 'candles', 'choir-church'] },
},
'bold-youth': {
id: 'bold-youth', template: 'bold', label: 'Bold: a young, music-led church', alternate: false,
@@ -152,6 +175,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['christmas-experience', 'The Christmas experience', 26, 'Music, lights and the Christmas story for the whole family.'],
],
venue: 'The {short} auditorium',
photos: { hero: 'band-big', collage: ['worship-hands', 'youth-group'], welcome: 'congregation-modern', pastor: 'pastor-naidoo', invite: 'coffee-friends', ministries: ['kids-teacher', 'youth-outdoors', 'band-stage', 'bible-study'], team: ['team-kagiso', 'team-megan', 'team-ruan'], messages: ['sermon-stage', 'mic-blue', 'mic-red'], events: ['worship-hands', 'youth-outdoors', 'band-big'] },
},
'bold-plant': {
id: 'bold-plant', template: 'bold', label: 'Bold: a new church plant meeting in a school', alternate: true,
@@ -187,6 +211,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['christmas-in-the-hall', 'Christmas in the hall', 24, 'A family carol service with mince pies.'],
],
venue: 'The school hall',
photos: { hero: 'congregation-hall', collage: ['friends-picnic', 'coffee-friends'], welcome: 'welcome-greeting', pastor: 'pastor-moore', invite: 'hall-chairs', ministries: ['toddlers', 'school-hall', 'guitar-singer', 'meal-friends'], team: ['team-ayesha', 'team-chris', 'team-grace'], messages: ['sermon-hall', 'mic-audience', 'open-bible'], events: ['congregation-hall', 'friends-picnic', 'candles'] },
},
'community-family': {
id: 'community-family', template: 'community', label: 'Community: a family church with small groups', alternate: false,
@@ -222,6 +247,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['christmas-family-service', 'Christmas family service', 25, 'Our nativity, sung by the kids, followed by tea.'],
],
venue: '{name}',
photos: { hero: 'meal-family', collage: ['kids-craft', 'family-walk'], welcome: 'welcome-hug', pastor: 'pastor-andile', invite: 'coffee-group', ministries: ['toddlers', 'teens', 'band-small', 'bible-coffee'], team: ['team-michelle', 'team-reddy', 'team-lwazi'], messages: ['bible-study', 'open-bible', 'mic-audience'], events: ['friends-picnic', 'kids-drawing', 'candles'] },
},
'community-town': {
id: 'community-town', template: 'community', label: 'Community: a country-town church serving its district', alternate: true,
@@ -257,6 +283,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['new-year-prayer', 'New Year prayer breakfast', 36, 'Pray for the year ahead over breakfast in the hall.'],
],
venue: '{name}',
photos: { hero: 'farm-road', collage: ['farm-bales', 'country-church'], welcome: 'meal-table', pastor: 'pastor-willem', invite: 'church-light', ministries: ['kids-class', 'youth-outdoors', 'choir-gospel', 'food-parcels'], team: ['team-elsie', 'team-bongani', 'team-marie'], messages: ['pulpit', 'church-quiet', 'open-bible'], events: ['farm-bales', 'candles', 'prayer-group'] },
},
'clean-modern': {
id: 'clean-modern', template: 'clean', label: 'Clean: a contemporary church, simply put', alternate: false,
@@ -292,6 +319,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['christmas-day', 'Christmas Day', 28, 'One family service at 09:00, about 45 minutes.'],
],
venue: '{name}',
photos: { hero: 'coffee-friends', collage: ['meal-table', 'guitar-singer'], welcome: 'bible-coffee', pastor: 'pastor-daniel', invite: 'church-light', ministries: ['kids-teacher', 'students-lecture', 'guitar-room', 'meal-friends'], team: ['team-refilwe', 'team-sam', 'team-nadia'], messages: ['sermon-dark', 'mic-white', 'open-bible'], events: ['coffee-group', 'candles', 'congregation-pews'] },
},
'clean-campus': {
id: 'clean-campus', template: 'clean', label: 'Clean: a church near the university', alternate: true,
@@ -327,6 +355,7 @@ export const DEMO_SEEDS: Record<WebsiteDemoProfile, DemoSeed> = {
['carols-on-campus', 'Carols on campus', 19, 'Carols on the library lawn for students who are still here.'],
],
venue: '{name}',
photos: { hero: 'campus-path', collage: ['students-lawn', 'supper-hall'], welcome: 'students-lecture', pastor: 'pastor-ian', invite: 'meal-table', ministries: ['family-picnic', 'bible-study', 'guitar-singer', 'students-fair'], team: ['team-lisa', 'team-thabo', 'team-priya'], messages: ['mic-crowd', 'mic-white', 'sermon-hall'], events: ['prayer-group', 'meal-friends', 'candles'] },
},
};