feat: add per-gallery thumbnail scale setting (#172) (#251)

Add a thumbnailScale field (xs/sm/md/lg/xl) to gallery layout settings
that adjusts column counts for Grid, Masonry (columns mode), and Mosaic
layouts. Each scale maps to a column offset applied on top of the
layout's base columns, letting photographers control photo density.

- Add thumbnailScale to GalleryLayoutSettings type
- Apply scale offset in Grid, Masonry, and Mosaic layout components
- Add thumbnail scale dropdown to admin theme customizer
- Conditionally show dropdown only for applicable layouts
- Safelist dynamic grid-cols classes in Tailwind config
- Add i18n keys for EN, DE, PT, RU locales

Co-authored-by: Paul Nothaft <[email protected]>
This commit is contained in:
Paul Nothaft
2026-03-18 10:44:07 +01:00
committed by GitHub
co-authored by Paul Nothaft
parent 3742d71535
commit ee46088985
10 changed files with 198 additions and 63 deletions
+7
View File
@@ -84,6 +84,13 @@ export default {
},
},
},
safelist: [
// Dynamic grid-cols classes used by thumbnail scale offsets
...Array.from({ length: 12 }, (_, i) => `grid-cols-${i + 1}`),
...Array.from({ length: 12 }, (_, i) => `sm:grid-cols-${i + 1}`),
...Array.from({ length: 12 }, (_, i) => `lg:grid-cols-${i + 1}`),
...Array.from({ length: 12 }, (_, i) => `xl:grid-cols-${i + 1}`),
],
plugins: [],
}