summary refs log tree commit diff
path: root/www/photo.causal.agency
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2025-04-13 00:11:30 -0400
committerJune McEnroe <june@causal.agency>2025-04-13 00:11:30 -0400
commitb5625267e7c485f4c3b6ff23da8d03b55afc8e00 (patch)
treef936aefc0d6f4c777ae568648a3624ea5739f81b /www/photo.causal.agency
parentDon't list lens in trips if fixed (diff)
downloadsrc-b5625267e7c485f4c3b6ff23da8d03b55afc8e00.tar.gz
src-b5625267e7c485f4c3b6ff23da8d03b55afc8e00.zip
Also hide lens for trips if it hasn't changed
Diffstat (limited to '')
-rw-r--r--www/photo.causal.agency/trips.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/www/photo.causal.agency/trips.html b/www/photo.causal.agency/trips.html
index b0cf1de2..d65aeaef 100644
--- a/www/photo.causal.agency/trips.html
+++ b/www/photo.causal.agency/trips.html
@@ -220,7 +220,7 @@ function setTrips() {
 		rollLi.appendChild(document.createTextNode(` (${rollTrips[0].body})`));
 		let body = bodies.find(body => body.name == rollTrips[0].body);
 		let rollUl = document.createElement("ul");
-		for (let trip of rollTrips) {
+		for (let [index, trip] of rollTrips.entries()) {
 			let li = document.createElement("li");
 			let b = document.createElement("b");
 			b.appendChild(document.createTextNode(trip.date));
@@ -228,7 +228,10 @@ function setTrips() {
 			li.appendChild(document.createTextNode(
 				`: ${trip.firstExposure}–${trip.lastExposure}`
 			));
-			if (body.mount != body.name) {
+			if (
+				body.mount != body.name &&
+				(!index || trip.lens != rollTrips[index-1].lens)
+			) {
 				li.appendChild(document.createElement("br"));
 				li.appendChild(document.createTextNode(trip.lens));
 			}