From b5625267e7c485f4c3b6ff23da8d03b55afc8e00 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 13 Apr 2025 00:11:30 -0400 Subject: Also hide lens for trips if it hasn't changed --- www/photo.causal.agency/trips.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'www/photo.causal.agency') 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)); } -- cgit 1.4.1