diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-22 09:52:57 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-22 09:52:57 +0300 |
| commit | 6945a0ae9afb18313636c09f34959ee5b225f78d (patch) | |
| tree | e74aa7b861543f5407de863f9667b4ccc994bbbd /docs | |
| parent | 79d78a296d2919155fe4d4bb2fac73d2fa7adeec (diff) | |
Add dynamic subdivided thumbnail tiles
Make the album preview grid livelier: with a configurable probability
(THUMB_SUBDIVIDE_PERCENT, default 30%) a square thumbnail tile is
subdivided into several smaller thumbnails packed into the same square
footprint, chosen at random from:
- quad: 2x2 squares (4 photos)
- two-wide: two stacked full-width strips (2 photos)
- squares+wide: two squares plus one full-width strip, strip on the
top or the bottom (3 photos)
Each sub-thumbnail stays its own clickable photo with its own view page;
subdivision only groups consecutive photos visually, so preview
numbering and the view/details/redirect pages are unchanged. No new
images are generated (CSS object-fit crops the existing aspect-correct
thumbs into squares or wide strips). Sub-thumbnails get the same random
entry animation and the same dramatic hover (flip/scale/rotate/filter)
as full thumbs. The layout choice reuses the seeded random_index, so
builds stay reproducible under RANDOM_SEED. THUMB_SUBDIVIDE_PERCENT=0
reproduces the previous output byte-for-byte.
The new option is wired through the config defaults, validation
(0..100), --print-config, the --subdivide 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.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/configuration.md | 5 | ||||
| -rw-r--r-- | docs/generation.md | 6 | ||||
| -rw-r--r-- | docs/usage.md | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index d6471b4..5d61a27 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -13,6 +13,7 @@ values for the current run. | `HEIGHT` | `1200` | Scaled photo height in pixels. Leave unset to keep original size. Optional positive integer. | | `THUMBHEIGHT` | `300` | Thumbnail height in pixels. Positive integer. | | `MAXPREVIEWS` | `40` | Maximum previews per page. Positive integer. | +| `THUMB_SUBDIVIDE_PERCENT` | `30` | Percent chance (0-100) that a preview tile is subdivided into smaller thumbnails (2x2 quad, two stacked wide strips, or two squares plus one wide strip on top/bottom). Each sub-thumbnail is its own clickable photo. `0` disables it. | | `IMAGE_JOBS` | `3` | Parallel jobs for image processing and HTML template rendering. Positive integer. | | `IMAGEMAGICK_TIMEOUT` | `60` | Per-ImageMagick-command timeout in seconds. Positive integer. | | `TAR_TIMEOUT` | `120` | Tarball creation timeout in seconds. Positive integer. | @@ -53,6 +54,7 @@ The checks (details in `src/lib/config.validate.source.sh`): `IMAGE_JOBS`, `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`. * **Positive integers**: `THUMBHEIGHT`, `MAXPREVIEWS`, `IMAGE_JOBS`, `IMAGEMAGICK_TIMEOUT`, `TAR_TIMEOUT`; `HEIGHT` is an optional positive integer. +* **Percentage (0-100 integer)**: `THUMB_SUBDIVIDE_PERCENT`. * **`yes`/`no` settings**: `SHUFFLE`, `SPLASH_PAGE`, `STATS_PAGE`, `TARBALL_INCLUDE`, `SYNC_DELETE` (where applicable). * **Readable input**: `INCOMING_DIR` must be a readable directory; `TEMPLATE_DIR` @@ -74,7 +76,8 @@ Generation stops before writing album output when validation fails. `--print-config` writes stable shell-style assignments to stdout in this order: `CONFIG_SOURCE`, `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`, `FAVICON`, -`SOURCE_URL`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, `IMAGE_JOBS`, +`SOURCE_URL`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, +`THUMB_SUBDIVIDE_PERCENT`, `IMAGE_JOBS`, `IMAGEMAGICK_TIMEOUT`, `RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, `STATS_PAGE`, `TARBALL_INCLUDE`, `TARBALL_SUFFIX`, `TAR_TIMEOUT`, `TAR_OPTS`, `SYNC_DELETE`, `SYNC_DESTINATIONS`, `ORIGINAL_BASEPATH`. diff --git a/docs/generation.md b/docs/generation.md index c377adf..b89cafc 100644 --- a/docs/generation.md +++ b/docs/generation.md @@ -96,9 +96,9 @@ metadata records: * the source `INCOMING_DIR` and source image count; * generated photo, thumbnail, and HTML file counts; * tarball status (included + file); -* effective settings (title, height, thumbheight, maxpreviews, image jobs, - random seed, shuffle, splash page, stats page, original basepath) useful for - debugging a published album. +* effective settings (title, height, thumbheight, maxpreviews, subdivide + percent, image jobs, random seed, shuffle, splash page, stats page, original + basepath) useful for debugging a published album. ## Favicon diff --git a/docs/usage.md b/docs/usage.md index b11514b..f4c8d27 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -68,6 +68,7 @@ config variable documented in [configuration.md](configuration.md). | `--height VALUE` | `HEIGHT` | | `--thumbheight VALUE` | `THUMBHEIGHT` | | `--maxpreviews N` | `MAXPREVIEWS` | +| `--subdivide PERCENT` | `THUMB_SUBDIVIDE_PERCENT` | | `--image-jobs N` | `IMAGE_JOBS` | | `--random-seed VALUE` | `RANDOM_SEED` | | `--shuffle` | `SHUFFLE=yes` | |
