summaryrefslogtreecommitdiff
path: root/share/templates/default/camera.tmpl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-15 13:26:28 +0300
committerPaul Buetow <paul@buetow.org>2026-06-15 23:50:40 +0300
commit6e47246dbbc97821b97aa9c45352abc9c2a9aa4a (patch)
treeaa893f4ef633f76faab5731313de2d694a1de94e /share/templates/default/camera.tmpl
parent3adeaa68af3bac73450a4156edb51fd1ec88347a (diff)
Stats/camera pages: blurred background, album-like camera thumbs, spacing
Three refinements to the stats site: - Stats and per-camera pages now get a random blurred background image (same seeded pick the album preview pages use) instead of a plain black page. Adds _stats_random_background + STATS_BLURS_DIR; falls back to black when no photos exist (e.g. isolated unit tests). - Per-camera thumbnails now behave like the main album: they link to each photo's album view page (navigation, details, EXIF tooltip) and carry the same seeded animation class, instead of linking to the raw image. render_album_pages records a photo -> "<page>-<preview>" map (ALBUM_VIEW_PAGE_BY_PHOTO) that the camera pages read; photos with no recorded view page fall back to the image. - Spacing: the camera leaderboard rows get padding + a separator line so the long wrapping camera names are distinguishable, and the stats sections, headings, bar rows, back-link, and camera grid get moderate extra spacing so nothing looks cramped. Tests updated for the new camera-thumbnail markup and extended to assert the stats background and the album view-page links; camera.tmpl comment corrected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'share/templates/default/camera.tmpl')
-rw-r--r--share/templates/default/camera.tmpl9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/templates/default/camera.tmpl b/share/templates/default/camera.tmpl
index 39ca273..2e08461 100644
--- a/share/templates/default/camera.tmpl
+++ b/share/templates/default/camera.tmpl
@@ -7,10 +7,11 @@
# <html>/<head>/<body> and footer come from the header/footer templates, which
# render_camera_pages emits around this one (same pattern as stats/view/details).
#
-# Thumbnails link to the full-size image under photos/ rather than to a per-photo
-# view page: a camera page is built outside the album's pagination loop and so
-# cannot know which <page>-<preview>.html a given photo landed on. Linking to the
-# original image is the sensible derivable target (see render_camera_pages).
+# Thumbnails link to each photo's album view page (navigation, details, EXIF
+# tooltip) so a camera page behaves exactly like the main album.
+# render_camera_pages resolves the <page>-<preview>.html target from the map the
+# album build records; a photo with no recorded view page falls back to the
+# full-size image under photos/ (see render_camera_pages).
cat <<END
<div class="view stats camera">
<h1 class="stats-title">${render_title_html} &mdash; ${render_camera_name_html}</h1>