Updated March 2, 2026
Image Gallery
Two gallery systems. Plugin pages use the screenshot viewer. Editorial pages use the photo grid.
Thumbnail gallery
Plugin screenshot viewer. At least two direct img children. script.js rebuilds into .plugin-gallery__main plus .plugin-gallery__thumbs / .plugin-gallery__thumb.is-selected.
<div class="plugin-gallery">
<img src="/path/screenshot1.png" alt="Description 1">
<img src="/path/screenshot2.png" alt="Description 2">
<img src="/path/screenshot3.png" alt="Description 3">
</div>
Instructions
- Javascript finds every
.plugin-gallerythat has two or more directimgchildren. - Builds the main image (first
img) and a list of thumbnails (one perimg). - Clicking a thumb updates the main image and sets
is-selectedon that thumb. - Thumbs are
<button>s inside<ul>/<li>for accessibility and semantics.
Photo gallery
In a markdown file, if images have a space between them they will render as stacked full width images. If there are no spaces between the images, javascript will automatically create an image gallery.
Details
- No blank lines between image markdown often renders as multiple
<img>inside the same paragraph, so JS adds.photo-galleryand wraps each image (plus an optional caption<span>) in.gallery-item. - Blank lines render as separate paragraphs (one image per
<p>), so each paragraph has only 1 image and does not get.photo-gallery, so images stack. - Always 2 columns on mobile.
To specify columns
Add a modifier. Default (no modifier) = 2 across.
- 2 across:
class="photo-gallery"orclass="photo-gallery photo-gallery--2" - 3 across:
class="photo-gallery photo-gallery--3" - 4 across:
class="photo-gallery photo-gallery--4" - 5 across:
class="photo-gallery photo-gallery--5" - 6 across:
class="photo-gallery photo-gallery--6"
<div class="photo-gallery photo-gallery--3">
<div class="gallery-item"><img src="…" alt=""></div>
<div class="gallery-item"><img src="…" alt=""></div>
<div class="gallery-item"><img src="…" alt=""></div>
</div>