Alle Fotos CC-BY-4.0 Paul Robben. Der Code basiert auf dem Astro Photo Grid ⬇️
A minimal, single-page photo gallery for Astro. See the demo!
- Responsive, justified grid using modern CSS. All layout and reflow logic is handled with pure CSS—no JS required for positioning!
- Automatic lightbox integration. Images open in a full-screen preview using Fancybox, which includes swipe, drag, pinch-to-zoom, and a customizable toolbar.
- Optimized image loading and sizing. Images on the grid are optimized using Astro's
<Image />component. Images on the grid beyond the first screen are lazily loaded.
- Click "Use this template" and create a new repository.
- In
astro.config.mjs, updatesitefromhttps://mysite.comto your site URL. - In
src/layouts/BaseLayout.astro, updatesiteNameto your site name. - Replace the items in
src/imageswith your own photos. - Good to go!
- CSS-only justified gallery layout from Helmut Wandl and SmolCSS
- Fancybox lightbox
- All demo images from Unsplash
