From d14b15420c7782cc51360b897c431a7d0e0642a7 Mon Sep 17 00:00:00 2001 From: June Date: Fri, 14 Nov 2025 14:16:20 +1300 Subject: [PATCH] add position indicator to buttons --- web/src/components/photos/carousel.astro | 17 ++++++++--------- web/src/layout/Base.astro | 8 +------- web/src/pages/photos/index.astro | 5 +++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/web/src/components/photos/carousel.astro b/web/src/components/photos/carousel.astro index e8ea55e..a58518b 100644 --- a/web/src/components/photos/carousel.astro +++ b/web/src/components/photos/carousel.astro @@ -23,9 +23,16 @@ const getImageLink = async (record: any) => { const titleEl = document.getElementById('photo-title'); const cameraEl = document.getElementById('photo-camera'); const locationEl = document.getElementById('photo-location'); + const currentPosIndicator = document.getElementById('current-pos'); + const maxPosIndicator = document.getElementById('max-pos'); + + maxPosIndicator!.innerText = cap as string + currentPosIndicator!.innerText = (pos + 1) as string function updatePhoto() { const currentPhoto = photos[pos]; + + currentPosIndicator!.innerText = (pos + 1) as string // Update image src if (img && currentPhoto) { @@ -64,15 +71,7 @@ const getImageLink = async (record: any) => { - - +
-
\ No newline at end of file diff --git a/web/src/layout/Base.astro b/web/src/layout/Base.astro index 191609b..6cf2c35 100644 --- a/web/src/layout/Base.astro +++ b/web/src/layout/Base.astro @@ -17,13 +17,6 @@ import Footer from "@components/footer" - -