Let spotlight images open full-size, like gallery images
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- html, javascript, scss
- Domain
- accessibility, frontend, web-dev
Research direction
Start with the gallery lightbox in assets/js/main.js, then inspect the spotlight markup and _spotlight.scss, including the absolute-positioned image rules. Decide how the spotlight link and affordance should work across pointer, keyboard, and touch input. Done means every intended spotlight opens and closes at full frame, and check-render passes at desktop and 375px.
Written by the indexing model from the issue text.
Description
Spotlight photos are cropped by object-fit: cover to whatever ratio the viewport gives the .image pane, and there is no way to see the whole frame. Gallery thumbnails already open their full image in the lightbox (.gallery.lightbox in assets/js/main.js). Spotlights could do the same.
Raised while adding William's own kit photos to coffee.html (#181/#182). The Hoffmann book shot in particular crops tightly at some ratios.
Open questions
- Affordance. Galleries show a caption with an "Expand" button on hover. A spotlight has no caption, so how does a reader know the image is clickable? Options: a cursor change alone, a hover zoom or overlay, a small expand icon in a corner. Hover does nothing on touch, so whatever we pick shouldn't rely on it.
- Mechanism. Reuse the gallery lightbox code in
main.jsby wrapping the spotlight<img>in an<a href>to the full image, or write a separate handler. Reusing it probably means generalising its selector away from.gallery. - Scope. Every spotlight on every page, or opt-in per section with a class? Unsplash hero/stock photos may not be worth expanding.
- Full image source. The spotlight already serves the master (resized to 1600px at deploy), so the link target could be the same file, unless we want a larger
fulls/-style variant. - The
.spotlight.style1 .image imgisposition: absolute, so the wrapping<a>needs to fill the pane without breaking the orientation rules in_spotlight.scss.
Acceptance criteria
- A spotlight image can be opened at full frame, uncropped, and closed again with keyboard as well as pointer.
- Touch devices get the same behaviour, with no hover-only affordance.
-
check-renderstill passes at desktop and 375px.
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- Avg merge
- 8h 17m
- Merged PRs (30d)
- 58
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from laywill/laywill.github.io
-
design
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
laywill/laywill.github.io#186 ·
-
design
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
laywill/laywill.github.io#183 · 1 comment ·
-
Difficulty 2/5 Half a day Newbie friendliness 74/100
laywill/laywill.github.io#135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
laywill/laywill.github.io#106 ·
-
infra needs-william
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
laywill/laywill.github.io#35 · 1 comment ·
All issues in laywill/laywill.github.io
Similar issues
-
status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
a2ui-project/a2ui#2763 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
docToolchain/docToolchain#1702 · 1 comment ·
-
enhancement frontend good first issue
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ankit02327/stock-price#76 · 2 comments ·
-
Module: Analytics P1 Type: Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
google/site-kit-wp#13665 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1406 ·