mobile view

This commit is contained in:
j 2025-03-28 11:14:33 +00:00
parent cc4a03c363
commit b7b4b5dd36
2 changed files with 17 additions and 6 deletions

View file

@ -22,11 +22,13 @@
height: calc(100vh - 180px);
}
@media screen and (max-width: 39.9375em) {
.photo-container .image {
height: auto;
width: 100%;
}
&:open {
overflow: auto;
}
.photo-container .image {
height: auto;
width: 100%;
}
}
.main-image {
width: 100%;
@ -45,6 +47,11 @@
margin-top: 10px;
overflow: auto;
}
@media screen and (max-width: 39.9375em) {
.thumbnails {
flex-wrap: wrap;
}
}
.thumbnail {
width: 80px;
height: 60px;

View file

@ -142,7 +142,11 @@ function loadGallery(images, idx, main, thumbnails) {
gallery.querySelectorAll(".thumbnail").forEach((thumb, i) => {
thumb.classList.toggle("active", i === index);
});
gallery.querySelector('.active').scrollIntoView()
if document.querySelector(".thumbnail").parentElement
if (thumbnailsContainer && thumbnailsContainer(thumbnailsContainer).flexWrap == "nowrap") {
gallery.querySelector('.active').scrollIntoView()
}
}
if (images[index].orig) {
download.href = images[index].orig