website 1.11.0: layouts and backgrounds for the blocks; a video for the top of the page
- Blocks get layouts (BLOCK_VARIANTS: text standard/centred; image and text photo left, right or above; quote centred/with a line; call to action centred/banner), stored on Section.variant and checked against the type; an unknown one draws as the default, as every block looked before. The demo's image-text block id is now image-left. - Each block has its own background (Section.background, migration 20261201000000_block_background), in the published source only when set, put back by Discard and Restore, drawn as the homepage's (data-bg). - MP4 uploads up to 20 MB for the hero's Video layout: QuickTime refused, metadata boxes (udta, meta, uuid) blanked into free boxes of the same size so where it was filmed is gone and the frame offsets hold; size read from tkhd. GET /media lists mime. - Admin: a block's Layout and Background when open; the hero's Video field (only videos; photo fields only photos); the media library shows and takes videos. An upload over the limit says so instead of "That request isn't valid." - Tests: backend (152, three new); e2e for block layouts and a video upload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,39 @@
|
||||
# Changelog — Church Website
|
||||
|
||||
## [1.11.0] — 2026-12-01
|
||||
|
||||
**Migration** `20261201000000_block_background` (adds the nullable `Section.background`; nothing
|
||||
to fill in). No new environment settings.
|
||||
|
||||
### Added
|
||||
|
||||
- **Block layouts** (`BLOCK_VARIANTS` in `src/site/variants.ts`): text `standard` · `centred`;
|
||||
image and text `image-left` · `image-right` · `image-above`; quote `centred` · `line`; call to
|
||||
action `centred` · `banner`. Stored on the block (`Section.variant`, which blocks had but never
|
||||
used); `PUT /pages/:id/blocks/:sid` refuses an id that isn't the type's. The snapshot draws an
|
||||
unknown or missing one as the type's default (`blockVariant`), which is how every block looked
|
||||
before, so nothing changes until a church picks one. The demo's image-and-text block had the id
|
||||
`image-text`; it's now `image-left`.
|
||||
- **A block's own background** (`Section.background`, one of `SECTION_BACKGROUNDS` or null), set
|
||||
with the same endpoint and carried to the snapshot's section, where the site draws it as the
|
||||
homepage's (`data-bg`). The published source lists it only when set, so earlier versions compare
|
||||
equal; Discard and Restore put it back.
|
||||
- **Videos in the media library:** `POST /media` takes an MP4 (sniffed by its `ftyp` box) up to
|
||||
20 MB (`MAX_VIDEO_BYTES`, under the installers' nginx `client_max_body_size 25m`) and keeps it
|
||||
as uploaded, with no other sizes, counted towards storage. QuickTime (`.mov`) is refused with a
|
||||
message to export MP4. Its metadata boxes (`udta`, `meta`, `uuid` in the file and its tracks)
|
||||
are turned into `free` boxes of the same size, zeroed (`cleanVideo`), so where it was filmed is
|
||||
gone and the offsets to the frames hold. Width and height come from the first track's `tkhd`.
|
||||
`GET /media` lists each item's `mime`.
|
||||
- **Admin:** a block, when open, has its Layout and Background (saved straight away); the hero has
|
||||
a Video field for the Video layout, which only offers videos (photo fields only offer photos);
|
||||
the media library shows videos and takes them.
|
||||
|
||||
### Changed
|
||||
|
||||
- A request larger than the upload limit says so ("photos can be up to 15 MB and videos up to 20
|
||||
MB") instead of "That request isn't valid."
|
||||
|
||||
## [1.10.0] — 2026-12-01
|
||||
|
||||
No migration, no new environment settings, no backend change.
|
||||
|
||||
Reference in New Issue
Block a user