Repository navigation
fix(gallery): undistorted photos, tidy lightbox (v0.0.5) - #11
Merged
Merged
Conversation
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]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ⭐️
[lang]wrapper that ssg never emits, so photographs were stretched to theirheight="900"attribute. They now form a two-column grid (one column on phones) of 4:3 photographs, cropped rather than distorted._headersis restored, bringing backnosniff, the referrer policy andframe-ancestors. The README records that JavaScript detections must stay off for this zone.What's Changed
revert: publish ssg's _headers againby @sebastienrousseaufix(gallery): apply grid and crop to galleriesby @sebastienrousseauchore(release): v0.0.5by @sebastienrousseauValidation
make build,check-ssg-pin.py,check-seo.py, regression and contrast checks: pass.wrangler devat 1440, 1024 and 390 px: grid, crop and lightbox checked; no console errors on any page.Full Changelog: main...feat/v0.0.5