mobile view
This commit is contained in:
parent
cc4a03c363
commit
b7b4b5dd36
2 changed files with 17 additions and 6 deletions
|
@ -22,11 +22,13 @@
|
||||||
height: calc(100vh - 180px);
|
height: calc(100vh - 180px);
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 39.9375em) {
|
@media screen and (max-width: 39.9375em) {
|
||||||
|
&:open {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
.photo-container .image {
|
.photo-container .image {
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.main-image {
|
.main-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -45,6 +47,11 @@
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
@media screen and (max-width: 39.9375em) {
|
||||||
|
.thumbnails {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
|
|
@ -142,8 +142,12 @@ 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);
|
||||||
});
|
});
|
||||||
|
if document.querySelector(".thumbnail").parentElement
|
||||||
|
|
||||||
|
if (thumbnailsContainer && thumbnailsContainer(thumbnailsContainer).flexWrap == "nowrap") {
|
||||||
gallery.querySelector('.active').scrollIntoView()
|
gallery.querySelector('.active').scrollIntoView()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (images[index].orig) {
|
if (images[index].orig) {
|
||||||
download.href = images[index].orig
|
download.href = images[index].orig
|
||||||
download.classList.remove('disabled')
|
download.classList.remove('disabled')
|
||||||
|
|
Loading…
Add table
Reference in a new issue