changed src of gallery photos

This commit is contained in:
KoenDR06 2025-06-05 22:05:33 +02:00
parent 7dc6ff4bd1
commit 065a59861a
2 changed files with 4 additions and 5 deletions

3
.gitignore vendored
View file

@ -1,6 +1,5 @@
.idea/
_site/
node_modules/
src/static/gallery/
package-lock.json
package-lock.json

View file

@ -6,7 +6,7 @@ layout: empty
<div class="wrapper">
<div class="slideshow">
<img alt="Photo" src="/static/gallery/{{ photos.photos[0] }}">
<img alt="Photo" src="https://public.koendev.nl/{{ photos.photos[0] }}">
</div>
<div class="controls">
<button id="prev"><img src="/static/prev.svg" class="control" alt="Previous photo"></button>
@ -25,14 +25,14 @@ layout: empty
let i = 1;
function next() {
img.src = `/static/gallery/${photos[i++]}`;
img.src = `https://public.koendev.nl/${photos[i++]}`;
if (i >= photos.length) {
i = 0;
}
}
function prev() {
img.src = `/static/gallery/${photos[i--]}`;
img.src = `https://public.koendev.nl/${photos[i--]}`;
if (i < 0) {
i = photos.length-1;
}