Skip to content

fix(gallery): undistorted photos, tidy lightbox (v0.0.5) - #11

Merged
sebastienrousseau merged 3 commits into
mainfrom
feat/v0.0.5
Dec 5, 2026
Merged

sebastienrousseau merged 3 commits into
mainfrom
feat/v0.0.5

Conversation

@sebastienrousseau

Copy link
Copy Markdown
Owner

This PR fixes the stretched photographs and the loose lightbox on every alienstudio.com collection page.

It also reverts #10, which did not stop the console errors it targeted, and documents the zone setting that does.

Highlights ⭐️

  • Galleries render as designed: the gallery CSS targeted a [lang] wrapper that ssg never emits, so photographs were stretched to their height="900" attribute. They now form a two-column grid (one column on phones) of 4:3 photographs, cropped rather than distorted.
  • Tidy lightbox: the figure sizes to the photograph, so the caption sits directly under it and the arrows line up with it.
  • fix(deploy): publish without ssg _headers (v0.0.4) #10 reverted: each page's meta CSP also allows only same-origin scripts, so Cloudflare's injected bot-detection script was still blocked. The script changes on every request, so no CSP hash can allow it. _headers is restored, bringing back nosniff, the referrer policy and frame-ancestors. The README records that JavaScript detections must stay off for this zone.

What's Changed

Validation

  • make build, check-ssg-pin.py, check-seo.py, regression and contrast checks: pass.
  • Chrome under wrangler dev at 1440, 1024 and 390 px: grid, crop and lightbox checked; no console errors on any page.
  • axe-core: 19 pages, 0 violations.

Full Changelog: main...feat/v0.0.5

This reverts 446d275. Its premise was wrong: each page's meta CSP also
allows only 'self' scripts, so Cloudflare's injected inline script
(__CF$cv$params) was still blocked and production still logged the
error on all 19 pages. The script changes on every request, so no CSP
hash can allow it; the fix is to keep JavaScript detections off for
the zone, which the README now records.

Restoring _headers brings back nosniff, the referrer policy and
frame-ancestors.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
The gallery rules targeted .collection-content > [lang], a wrapper
ssg has never emitted, so none of them applied: each photograph took
its height="900" attribute at full column width and was stretched.
The rules now target .collection-content, giving the intended
two-column grid (one column on narrow screens) of 4:3 photographs
cropped with object-fit: cover.

The lightbox figure now sizes to the photograph, so the caption sits
under it and the previous/next buttons line up with it, instead of
the image floating in a full-height box with the caption at the
bottom of the screen.

Checked in Chrome at 1440, 1024 and 390 px wide; axe: 0 violations on
19 pages.

Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
Signed-off-by: Sebastien Rousseau <sebastienrousseau@users.noreply.github.com>
Assisted-by: Claude Code:claude-opus-5-5 [Bash, Read, Edit]
@sebastienrousseau
sebastienrousseau merged commit 9b2389d into main Dec 5, 2026
10 checks passed
@sebastienrousseau
sebastienrousseau deleted the feat/v0.0.5 branch December 5, 2026 09:37
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