« get me outta code hell

content, css: narrow image link/reveal interactivity wrapper - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-11 20:23:58 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-11 20:24:47 -0400
commit4ad0c3946a132f20742cc4de7f7dd31c79bb4653 (patch)
tree022692277e6c644cbb19174816964e0dbfb39aa9 /src/content
parent2016bd4c6f966f2ac80e958656829371419d3bba (diff)
content, css: narrow image link/reveal interactivity wrapper
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/image.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index 9de58dce..5ea89a57 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -338,14 +338,25 @@ export default {
       }
 
       wrapped =
+        html.tag('div', {class: 'image-inner-area'},
+          wrapped);
+
+      if (willLink) {
+        wrapped =
+          html.tag('a', {class: 'image-link'},
+            linkAttributes,
+
+            wrapped);
+      }
+
+      wrapped =
         html.tag('div', {class: 'image-container'},
           containerAttributes,
 
           !originalSrc &&
             {class: 'placeholder-image'},
 
-          html.tag('div', {class: 'image-inner-area'},
-            wrapped));
+          wrapped);
 
       if (willReveal) {
         wrapped =
@@ -367,17 +378,6 @@ export default {
               wrapped));
       }
 
-      if (willLink) {
-        wrapped =
-          html.tag('a', {class: ['box', 'image-link']},
-            linkAttributes,
-
-            visibility === 'hidden' &&
-              {class: 'js-hide'},
-
-            wrapped);
-      }
-
       return wrapped;
     }
   },