NGU-Web/src/lib
Zaldimmar 8c26ec4906 Add a featured video mode to the front page hero
A fourth hero mode beside brand, photos and livestream: a recorded
video next to the words, under a "Featured video · <title>" badge.
Unlike the livestream it never autoplays: an embed waits for play,
and a file shows the browser's own player with preload="metadata".

video_url takes a YouTube, Vimeo or Facebook link (turned into an
embed, as the livestream's is) or a video file: a filename in
public/front-page/, a /path, or an https URL ending in .mp4, .webm,
.m4v, .mov or .ogv. Anything else that can't be framed still gets a
"Watch the video" button. Files follow the embeds' https-only rule.

Its own video_url and video_title columns rather than the
livestream's, so both can be set up ahead of time and the mode
switches between them. Migration 024 rebuilds front_page for the
wider hero_mode CHECK; its children, keys and touch trigger survive.

embeds.ts gains an autoplay switch shared by both modes, and
videoSource() to tell a file from an embed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 17:55:51 -05:00
..
adminSchema.ts Add a featured video mode to the front page hero 2026-09-26 17:55:51 -05:00
adminTitle.tsx Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
api.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
auth.tsx Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
embeds.ts Add a featured video mode to the front page hero 2026-09-26 17:55:51 -05:00
eventSeries.ts Add a reusable event calendar and put it on the front page 2026-09-25 06:28:42 -05:00
eventTypes.ts Clean up the schema: drop unused tables, rename scopes, publishable awards 2026-09-26 17:09:58 -05:00
hrefs.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
media.ts Add a featured video mode to the front page hero 2026-09-26 17:55:51 -05:00
roles.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00
sections.tsx Revert the implicit-any typing of src/ 2026-09-26 15:32:28 -05:00
timeline.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
timelineRefs.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00
useContent.ts Clean up the schema: drop unused tables, rename scopes, publishable awards 2026-09-26 17:09:58 -05:00
useFrontPage.ts Add a featured video mode to the front page hero 2026-09-26 17:55:51 -05:00
useHistory.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
useRecord.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
useResource.ts Convert src/ JavaScript modules to TypeScript 2026-09-26 15:39:42 -05:00
version.ts v1.5 - history and timeline as well as many datastructure updates added, polished, fixes 2026-09-25 02:38:51 -05:00