« get me outta code hell

content: transformContent: got dang it - 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>2024-01-13 17:42:25 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-13 17:42:25 -0400
commit7ee58f434a5c34c73b60926595f99b83ed869ebf (patch)
tree0c1b508c7651773310453839fd74afd7a6db6bc6 /src
parent8b0f3c52869213ef229001f2b61cb967c35287c6 (diff)
content: transformContent: got dang it
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/transformContent.js12
-rw-r--r--src/static/site6.css6
2 files changed, 12 insertions, 6 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index ff893896..ddf82391 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -385,7 +385,7 @@ export default {
               type: 'image',
               inline: false,
               data:
-                html.tag('div', {class: 'content-image'},
+                html.tag('div', {class: 'content-image-container'},
                   image.slots({
                     src,
 
@@ -394,10 +394,12 @@ export default {
                     height: height ?? null,
                     thumb: slots.thumb,
 
-                    attributes:
-                      (pixelate
-                        ? {class: 'pixelate'}
-                        : null),
+                    attributes: [
+                      {class: 'content-image'},
+
+                      pixelate &&
+                        {class: 'pixelate'},
+                    ],
                   })),
             };
           }
diff --git a/src/static/site6.css b/src/static/site6.css
index 2058e984..cd00a721 100644
--- a/src/static/site6.css
+++ b/src/static/site6.css
@@ -739,11 +739,15 @@ ul.image-details li {
   display: none;
 }
 
-.content-image {
+.content-image-container {
   margin-top: 1em;
   margin-bottom: 1em;
 }
 
+.content-image {
+  display: inline-block !important;
+}
+
 .image-link {
   display: block;
   overflow: hidden;