From be6ae2c9541a01927616b46cf6a683d7ce4519ff Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 15 Jun 2026 13:55:32 +0300 Subject: Per-camera mini-albums: full-width grid + camera-scoped view navigation Two fixes to the per-camera pages: - The camera thumbnail grid is now full-width and reflows with the window like the main album. Previously it sat inside the 900px-wide stats column, so wide thumbnails only fit ~2 per row. camera.tmpl now puts the grid in a full-width sibling block (centered by the body, like the album's direct thumbnail children); the heading/back-link stay in the narrow stats column. - Each camera is now a self-contained mini album. Thumbnails link to per-camera view pages (camera---.html) whose prev/next cycle only through that camera's photos, instead of linking into the shared album view pages (where next/prev walked the whole album and left the camera). The view pages reuse the album's look (blurred background, EXIF tooltip, animation) and offer Gallery / Details (to the album details page) / Direct-link nav. The "--" index separator can never collide with a gallery name since slugs never contain "--". Adds cameraview.tmpl + its render field, _stats_render_camera_{gallery,views} and the cameraview body builders. Tests updated for the new thumbnail links and extended to assert the per-camera view pages and their camera-scoped navigation; required-context-vars test now also covers the camera and cameraview templates. Co-Authored-By: Claude Opus 4.8 --- share/templates/default/camera.tmpl | 15 ++++++++------- share/templates/default/cameraview.tmpl | 10 ++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 share/templates/default/cameraview.tmpl (limited to 'share') diff --git a/share/templates/default/camera.tmpl b/share/templates/default/camera.tmpl index 2e08461..982e32f 100644 --- a/share/templates/default/camera.tmpl +++ b/share/templates/default/camera.tmpl @@ -7,19 +7,20 @@ # // 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 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 -.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). +# This is a self-contained mini album: each thumbnail links to a per-camera view +# page (camera---.html) whose prev/next navigation cycles only +# through this camera's photos (see render_camera_pages). The heading and back +# link sit in the narrow centered stats column, but the thumbnail grid is a +# full-width sibling so it flows and wraps with the window like the main album +# (the album thumbnails are likewise direct, full-width body children). cat <

${render_title_html} — ${render_camera_name_html}

-
+
+
${render_camera_thumbs_html} -
END diff --git a/share/templates/default/cameraview.tmpl b/share/templates/default/cameraview.tmpl new file mode 100644 index 0000000..47b0e9b --- /dev/null +++ b/share/templates/default/cameraview.tmpl @@ -0,0 +1,10 @@ +# Per-camera view page body: a self-contained mini-album view. The whole body -- +# the photo and its camera-scoped navigator (prev/next cycle within the camera, +# plus links back to the gallery, the album details page, and the direct image) +# -- is pre-rendered by render_camera_pages in src/lib/stats.source.sh and handed +# in raw through render_cameraview_body_html. The surrounding chrome (header with +# the blurred background, and footer) comes from the header/footer templates, +# rendered around this one exactly like the album view pages. +cat <