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 {
|
.thumbnails {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
|
|
@ -142,6 +142,7 @@ function loadGallery(images, idx, main, thumbnails) {
|
||||||
gallery.querySelectorAll(".thumbnail").forEach((thumb, i) => {
|
gallery.querySelectorAll(".thumbnail").forEach((thumb, i) => {
|
||||||
thumb.classList.toggle("active", i === index);
|
thumb.classList.toggle("active", i === index);
|
||||||
});
|
});
|
||||||
|
gallery.querySelector('.active').scrollIntoView()
|
||||||
}
|
}
|
||||||
if (images[index].orig) {
|
if (images[index].orig) {
|
||||||
download.href = images[index].orig
|
download.href = images[index].orig
|
||||||
|
@ -204,7 +205,6 @@ function loadGallery(images, idx, main, thumbnails) {
|
||||||
currentIndex = imagesIndex.indexOf(src)
|
currentIndex = imagesIndex.indexOf(src)
|
||||||
}
|
}
|
||||||
updateGallery(currentIndex)
|
updateGallery(currentIndex)
|
||||||
console.log("!WTF", idx)
|
|
||||||
if (idx != 'inline') {
|
if (idx != 'inline') {
|
||||||
showGallery()
|
showGallery()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue