image + text-media: opt-in lightbox with native dialog #93
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
An opt-in
lightboxbool param (default false) onimage.yamlandtext-media.yaml. When enabled, each grid image is wrapped in an anchor to the full-size asset; a small dependency-free theme script upgrades that anchor into an in-page overlay using native<dialog>: Esc and backdrop close, prev/next navigation within the same grid, focus returned to the trigger on close.Progressive enhancement: with JS unavailable the anchor simply opens the full-size image. Per-image rule: if the
imgchild'slinkparam is set, that link always wins over the lightbox for that image.Acceptance criteria
lightboxbool param on both sidecars, default false; existing content unaffected when omitted<dialog>overlay: Esc + backdrop close, prev/next within grid, focus restore, alt text carried into the enlarged viewimg.linkset → that image navigates to the link, never opens the lightboxBlocked by
None - can start immediately
Triage confirmed — enhancement, ready-for-agent. The issue body is the authoritative agent brief.
Verified against the codebase: both target sidecars exist and share the same
imgitems collection, so one param + one anchor-wrapping rule covers both. Theimg.link-wins precedence rule is well-defined againstimg.yaml's existing params. The theme already ships a small first-party script pattern (video-embed facade) to model the dependency-free loader on.