diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-25 17:44:37 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-25 17:44:37 +0300 |
| commit | bef8a7af35174ebb065f240aacf3c51ccf50d460 (patch) | |
| tree | 25414e675e2040890cd8115aa70761e29f70c425 /share/templates/default/header.tmpl | |
| parent | 12b2733dab6da12a2a6cf1d27d69bc7d143f5dfc (diff) | |
Fill the album's short final page with a full-row tile
A short final preview page (e.g. one leftover photo when the photo count
isn't a multiple of the page size) can't be aligned to a multiple of 12
cells, so it left an orphaned bottom-right corner. The album's LAST page
now widens its leftover final single tile into a "fill" tile spanning the
whole row (grid-column: 1 / -1) at any breakpoint, so the bottom edge is
flush; object-fit: cover keeps the wider crop undistorted.
append_preview_grid takes a fill_last flag: render_full_preview_page sets
it only for the page with no "next" link; stats mini-albums pass 'no' so
their small galleries are unaffected. build_tile_block gains a 'fill'
layout and header.tmpl an a.fill-row rule.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'share/templates/default/header.tmpl')
| -rw-r--r-- | share/templates/default/header.tmpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/share/templates/default/header.tmpl b/share/templates/default/header.tmpl index c0a0fac..5d1b2e6 100644 --- a/share/templates/default/header.tmpl +++ b/share/templates/default/header.tmpl @@ -247,6 +247,16 @@ cat <<END grid-row: span 2; } + /* A "fill-row" tile spans the whole row at ANY column count + (grid-column: 1 / -1). Used for the single leftover photo on the + album's short final page so the bottom edge stays flush at every + breakpoint instead of an orphaned corner; object-fit: cover crops it + to the wide banner shape without distortion. */ + div.thumbs-grid a.fill-row { + grid-column: 1 / -1; + aspect-ratio: 3 / 1; + } + /* A subdivided thumbnail tile fills one grid cell with its own 2x2 inner grid packing several smaller thumbnails. Anchor order + the "wide" class (a full-width strip spanning both columns) produce the quad / |
