Repository navigation
Load home gallery images from OpenPlanner blocks - #85
Conversation
The OpenPlanner JSON now exposes the home gallery images under blocks.home.gallery['gallery-images'], so organisers can update the photos without a code change. The grid only has 8 slots, so extra images are ignored. The bundled /gallery images stay as a fallback when the block is missing or empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 7fe9b9b): https://sunnytechwebsite--pr85-gallery-from-openpla-y3ue5bpm.web.app (expires Tue, 20 Oct 2026 12:50:09 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: b96ac7ab85879442bb94dc448b41aeca0f34d16c |
The grid slots have very different shapes (wide, very tall, square, portrait, and they change between mobile and desktop), so photos in plain OpenPlanner order got cropped badly: landscape shots squeezed into the tall slot, heads cut off on wide screens. A curated layout keyed by the OpenPlanner file name now picks the photo for each slot (portrait shots go to the tall/portrait slots, the stage photo leads) and sets an object-position per photo. Each slot crops along one axis only, so a single position works on mobile and desktop. Photos not in the list keep their OpenPlanner order after the curated ones, centered, so new uploads still show up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Photos are now framed around their subject: each grid slot gets a photo that fits its shape (portrait shots in the tall/portrait slots, the stage photo first) and an The curated order and focal points live in Screenshots at 1440px and 375px below. |
Swap the outdoor buffet portrait for the wide shot of the outdoor stands in slot 6, whose shape matches it. The breakfast table photo moves to the portrait slot 7, framed on the three faces left of center. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Summary
The OpenPlanner JSON now exposes the home gallery images under
blocks.home.gallery['gallery-images']. The home gallery block reads them from there, so the photos can be updated from OpenPlanner without a code change.Changes
src/type.ts: add optionalblocksand aGalleryImagetype toOpenPlannerType.src/pages/index.astro: pass the gallery images toHomeGalleryBlock.src/components/home/HomeGalleryBlock.astro: take animagesprop, usealtwhen set, and fall back to the bundled/gallery/*.jpgwhen the block is missing or empty.src/components/home/galleryLayout.ts: curated slot order andobject-positionper photo, keyed by the OpenPlanner file name, so each photo fits its slot shape and keeps its subject in frame. The grid has 8 slots; the JSON has 13 photos. Photos not in the list follow in OpenPlanner order, centered.Caption and album link updated to the 2026 edition.
Test plan
bun run build(includesastro check) passes against the live OpenPlanner JSONindex.htmlcontains the 8 OpenPlanner image URLs🤖 Generated with Claude Code