summaryrefslogtreecommitdiff
path: root/src/lib/album-render.source.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/album-render.source.sh')
-rw-r--r--src/lib/album-render.source.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/album-render.source.sh b/src/lib/album-render.source.sh
index 4c65f69..fa8173f 100644
--- a/src/lib/album-render.source.sh
+++ b/src/lib/album-render.source.sh
@@ -121,10 +121,16 @@ render_full_preview_page() {
# also groups the page's photos into tiles (some subdivided into smaller
# thumbnails), so the per-page ordering and preview numbering stay here.
local preview_thumbs=''
+ # The album's last page (no "next" link) is the only one allowed to widen a
+ # leftover final tile to a full row, so a short final page stays flush.
+ local fill_last='no'
+ if [ -z "$next_page" ]; then
+ fill_last='yes'
+ fi
# The main album's view pages are "<page_num>-<preview_num>.html", so the
# shared grid builder gets "<page_num>-" as the href prefix.
append_preview_grid preview_thumbs \
- "$thumbs_dir" "$backhref" "$page_num-" "$@"
+ "$thumbs_dir" "$backhref" "$page_num-" "$fill_last" "$@"
template previewpage "$page_name.html" \
html_dir "$html_dir" \
preview_thumbs "$preview_thumbs"