big galleries

This commit is contained in:
j 2025-03-28 11:03:59 +00:00
parent cdeb79cd90
commit cc4a03c363
2 changed files with 2 additions and 2 deletions

View file

@ -42,8 +42,8 @@
.thumbnails {
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 10px;
overflow: auto;
}
.thumbnail {
width: 80px;

View file

@ -142,6 +142,7 @@ function loadGallery(images, idx, main, thumbnails) {
gallery.querySelectorAll(".thumbnail").forEach((thumb, i) => {
thumb.classList.toggle("active", i === index);
});
gallery.querySelector('.active').scrollIntoView()
}
if (images[index].orig) {
download.href = images[index].orig
@ -204,7 +205,6 @@ function loadGallery(images, idx, main, thumbnails) {
currentIndex = imagesIndex.indexOf(src)
}
updateGallery(currentIndex)
console.log("!WTF", idx)
if (idx != 'inline') {
showGallery()
}