You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* images: wrap images in a lightbox
Wrap images in a lightbox, increasing them to full-screen size when
clicked. There are JavaScript solutions available (e.g. lightbox2)[^0],
though I opted for a purely CSS-based approach.[^1]
[^0]: https://lokeshdhakar.com/projects/lightbox2/
[^1]: https://codesalad.dev/blog/how-to-create-an-image-lightbox-in-pure-css-25
Signed-off-by: Luca Zeuch <[email protected]>
* perf: lazy-load lightbox duplicate
The implementation of a lightbox requires that the image in question is
rendered twice, once in the actual content and a second time as an
off-screen image. Defer loading of that off-screen duplicate until it is
needed.
Signed-off-by: Luca Zeuch <[email protected]>
* layouts/images: allow opt-out from lightbox
Authors can now pass `lightbox=false` as a query parameter with their
image URL to disable the lightbox effect; this is especially useful for
smaller images that do not have a lot of detail.
Signed-off-by: Luca Zeuch <[email protected]>
* images: center lightbox on both axes when shown
Signed-off-by: Luca Zeuch <[email protected]>
---------
Signed-off-by: Luca Zeuch <[email protected]>
0 commit comments