« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js/client.js')
-rw-r--r--src/static/js/client.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index bee82938..31e16aa2 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -3891,17 +3891,25 @@ function generateSidebarSearchResultTemplate(slots) {
     }
   }
 
+  const imgContainer = document.createElement('span');
+  imgContainer.classList.add('wiki-search-result-image-container');
+
   if (slots.imageSource) {
     const img = document.createElement('img');
     img.classList.add('wiki-search-result-image');
     img.setAttribute('src', slots.imageSource);
-    link.appendChild(img);
+    imgContainer.appendChild(img);
+    if (slots.imageSource.endsWith('.mini.jpg')) {
+      img.classList.add('has-warning');
+    }
   } else {
     const placeholder = document.createElement('span');
     placeholder.classList.add('wiki-search-result-image-placeholder');
-    link.appendChild(placeholder);
+    imgContainer.appendChild(placeholder);
   }
 
+  link.appendChild(imgContainer);
+
   const text = document.createElement('span');
   text.classList.add('wiki-search-result-text-area');