big galleries
This commit is contained in:
parent
cdeb79cd90
commit
cc4a03c363
2 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@
|
|||
.thumbnails {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
overflow: auto;
|
||||
}
|
||||
.thumbnail {
|
||||
width: 80px;
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue