diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-25 23:37:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-25 23:37:11 +0300 |
| commit | a3a14a667c1b2123793d3769efe46117a7482e12 (patch) | |
| tree | 80ad6e38f10c73e26d80ebf37907fce50950cf6d /src/lib/random.source.sh | |
| parent | 131ef226bbffac1007672dfbd477917e92f1fe78 (diff) | |
Keep 2x2 features off the page bottom; flush short final pages
Two layout-breaking cases remained after the fixed-column grid landed:
1. A 2x2 feature spans two rows, so one placed near the bottom of a page
left an L-shaped gap grid-auto-flow: dense could not backfill (nothing
follows it) -- a cut-off corner. append_preview_grid now only offers the
feature layout while at least feature_tail_margin (16) photos remain, so
a hero always sits in the upper rows with enough trailing 1-cell tiles to
complete its rows at every breakpoint (and short pages get no hero).
2. A short final page (a leftover handful of photos) could be subdivided
down below 12 cells, where it can't be aligned to a multiple of 12 and is
ragged. Such pages now go through _build_final_page_tiles: plain singles,
then merge down to a multiple of 12 (count >= 12 -> flush grid) or a
full-row "fill" filmstrip (count < 12 -> one clean banner, or stacked
banners). Longer/full pages keep the normal roll-and-align path.
Verified hole-free at 2/3/4/6 columns with a grid-auto-flow:dense packing
simulator across ~480 generated pages (regular + short final), 0 failures.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/random.source.sh')
0 files changed, 0 insertions, 0 deletions
