« get me outta code hell

client, css: image-overlay: fix sizing images w/o thumbs - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-03-24 15:19:24 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-03-24 15:19:24 -0300
commitf639caa459925192dccd7a84a85abe8f249974f0 (patch)
tree53309b6f314e88a5c344a37e62163e316fb790c6 /src
parent172618d4b9f28b5bd5fc7e55cee0434a93bde895 (diff)
client, css: image-overlay: fix sizing images w/o thumbs
Diffstat (limited to 'src')
-rw-r--r--src/static/css/site.css4
-rw-r--r--src/static/js/client/image-overlay.js2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/static/css/site.css b/src/static/css/site.css
index d1d7f5f6..643fcae4 100644
--- a/src/static/css/site.css
+++ b/src/static/css/site.css
@@ -3200,6 +3200,10 @@ main.long-content .content-sticky-heading-container .content-sticky-subheading-r
   position: absolute;
 }
 
+#image-overlay-container.no-thumb #image-overlay-image {
+  position: static;
+}
+
 #image-overlay-image-thumb {
   filter: blur(16px);
   transform: scale(1.5);
diff --git a/src/static/js/client/image-overlay.js b/src/static/js/client/image-overlay.js
index a914d97c..da192178 100644
--- a/src/static/js/client/image-overlay.js
+++ b/src/static/js/client/image-overlay.js
@@ -226,9 +226,11 @@ async function loadOverlayImage(details) {
   if (details.thumbSrc) {
     info.thumbImage.src = details.thumbSrc;
     info.thumbImage.style.display = null;
+    info.container.classList.remove('no-thumb');
   } else {
     info.thumbImage.src = '';
     info.thumbImage.style.display = 'none';
+    info.container.classList.add('no-thumb');
   }
 
   // Show the thumbnail size on each <img> element's data attributes.