diff --git a/ui/index.html b/ui/index.html index 9f5547e2..25c78fd4 100644 --- a/ui/index.html +++ b/ui/index.html @@ -458,38 +458,8 @@ - diff --git a/ui/media/css/main.css b/ui/media/css/main.css index 5e1cee43..826ff168 100644 --- a/ui/media/css/main.css +++ b/ui/media/css/main.css @@ -1817,3 +1817,20 @@ div#enlarge-buttons { .imgContainer .spinnerStatus { font-size: 10pt; } + +/* Gallery CSS */ +#imagecontainer { + display: flex; + justify-content: space-around; + flex-flow: row wrap; + align-items: center; +} + +#imagecontainer>img { + width: 30vw; + min-width: 256px; + max-width: 1024px; + height: auto; + margin-block: 1vh; + border: 4px white solid; +} \ No newline at end of file diff --git a/ui/media/js/main.js b/ui/media/js/main.js index d8c1b614..c0ed9112 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -2787,3 +2787,15 @@ let recentResolutionsValues = [] heightField.value = temp }) })() + +/* Gallery JS */ + +function refreshGallery() { + let container = document.getElementById("imagecontainer") + container.remove() + fetch('/all_images') + .then(response => response.text()) + .then(text => new DOMParser().parseFromString(text, 'text/html')) + .then(html_like => html_like.getElementsByTagName('div')[0]) + .then(div => document.getElementById("tab-content-gallery").appendChild(div)) +} \ No newline at end of file