Skip to content

Load home gallery images from OpenPlanner blocks - #85

Merged
HugoGresse merged 4 commits into
mainfrom
gallery-from-openplanner
Oct 13, 2026
Merged

HugoGresse merged 4 commits into
mainfrom
gallery-from-openplanner

Conversation

@HugoGresse

@HugoGresse HugoGresse commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

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 optional blocks and a GalleryImage type to OpenPlannerType.

  • src/pages/index.astro: pass the gallery images to HomeGalleryBlock.

  • src/components/home/HomeGalleryBlock.astro: take an images prop, use alt when set, and fall back to the bundled /gallery/*.jpg when the block is missing or empty.

  • src/components/home/galleryLayout.ts: curated slot order and object-position per 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 (includes astro check) passes against the live OpenPlanner JSON
  • Built index.html contains the 8 OpenPlanner image URLs
  • Checked the rendered grid in the dev server at 375px, 1024px and 1440px (screenshots below and in the comments)

🤖 Generated with Claude Code

Home gallery with OpenPlanner images

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>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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>
@HugoGresse

Copy link
Copy Markdown
Member Author

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 object-position so faces and subjects stay in frame on mobile and desktop.

The curated order and focal points live in src/components/home/galleryLayout.ts, keyed by the OpenPlanner file name. Photos not listed there keep their OpenPlanner order after the curated ones, centered. If the gallery photos change in OpenPlanner, that file needs updating to keep the framing.

Screenshots at 1440px and 375px below.

Desktop 1440px

Mobile 375px

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>
@HugoGresse

Copy link
Copy Markdown
Member Author

Outdoor stands photo now in slot 6 (wide), breakfast table moved to slot 7, outdoor buffet portrait removed. Desktop only: slots 6-8 are hidden on mobile, so mobile is unchanged.

Desktop 1440px

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HugoGresse
HugoGresse merged commit c571f0b into main Oct 13, 2026
3 checks passed
@HugoGresse
HugoGresse deleted the gallery-from-openplanner branch October 13, 2026 12:54

This branch was successfully deployed

1 active deployment
production — 7fe9b9bd Deployed Oct 13, 2026 by HugoGresse via build_and_preview #193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant