Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
images: wrap images in a lightbox (#63)
* 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 <l-zeuch@email.de> * 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 <l-zeuch@email.de> * 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 <l-zeuch@email.de> * images: center lightbox on both axes when shown Signed-off-by: Luca Zeuch <l-zeuch@email.de> --------- Signed-off-by: Luca Zeuch <l-zeuch@email.de>
- Loading branch information