summaryrefslogtreecommitdiff
path: root/src/lib/config.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-22 10:15:42 +0300
committerPaul Buetow <paul@buetow.org>2026-06-22 10:15:42 +0300
commitb84647c749dabdc011f62d8e8213743fd03f565b (patch)
tree05c076cd2033ef99ce0f0f8b058ef0736b8642ec /src/lib/config.source.sh
parent6945a0ae9afb18313636c09f34959ee5b225f78d (diff)
Add large 2x2 feature tiles and a CSS-grid overview
Allow a single photo to be blown up into a large "feature" tile that spans a 2x2 block of the album overview, controlled by a new THUMB_FEATURE_PERCENT (0-100, default 10; 0 disables). Each tile rolls for a feature first, then for a subdivision, otherwise stays a normal square. To pack mixed-size tiles (normal 1x1, subdivided 1x1, feature 2x2) without gaps, the overview is now a real CSS grid with grid-auto-flow: dense, so smaller tiles backfill the holes a 2x2 feature would leave. Tile spacing moved from per-image padding to the grid gap. Feature tiles reuse the img.thumb class and its dramatic hover. THUMB_FEATURE_PERCENT is wired through the same layers as THUMB_SUBDIVIDE_PERCENT: config defaults, 0..100 validation, --print-config, the --feature CLI flag, the usage text, and the shuriken.json / --dry-run metadata, with docs and tests updated. Generated HTML and CSS pass the W3C Nu HTML checker and CSS validator. Setting both percentages to 0 reproduces the previous all-1x1 grid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/config.source.sh')
-rw-r--r--src/lib/config.source.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/config.source.sh b/src/lib/config.source.sh
index 538724f..67ddade 100644
--- a/src/lib/config.source.sh
+++ b/src/lib/config.source.sh
@@ -47,8 +47,10 @@ apply_config_defaults() {
SPLASH_PAGE="${SPLASH_PAGE:-yes}"
STATS_PAGE="${STATS_PAGE:-no}"
# Optional with a default (unlike the required THUMBHEIGHT): the percent
- # chance a preview tile is subdivided into smaller thumbnails. 0 disables it.
+ # chance a preview tile is subdivided into smaller thumbnails, and the
+ # percent chance it becomes a large 2x2 "feature" tile. 0 disables either.
THUMB_SUBDIVIDE_PERCENT="${THUMB_SUBDIVIDE_PERCENT:-30}"
+ THUMB_FEATURE_PERCENT="${THUMB_FEATURE_PERCENT:-10}"
SYNC_DELETE="${SYNC_DELETE:-yes}"
TARBALL_INCLUDE="${TARBALL_INCLUDE:-no}"
TARBALL_SUFFIX="${TARBALL_SUFFIX:-.tar}"