diff --git a/camp/static/css/site.scss b/camp/static/css/site.scss index fde4500..5166a4f 100644 --- a/camp/static/css/site.scss +++ b/camp/static/css/site.scss @@ -42,8 +42,8 @@ .thumbnails { display: flex; justify-content: center; - flex-wrap: wrap; margin-top: 10px; + overflow: auto; } .thumbnail { width: 80px; diff --git a/camp/static/js/gallery.js b/camp/static/js/gallery.js index d4ae2db..bffa4ae 100644 --- a/camp/static/js/gallery.js +++ b/camp/static/js/gallery.js @@ -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() }