« get me outta code hell

content: generateCoverArtwork: style cleanup - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-08 20:10:10 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-12-28 17:14:14 -0400
commit76756c4762a186536901a249fe40ae60867ba2ab (patch)
treeeb285239a619d7b5fc3892bfab47d4b6f98d0149
parent33fbdc1b5e70c0b8d3b8a71bacf3436e543c617a (diff)
content: generateCoverArtwork: style cleanup
-rw-r--r--src/content/dependencies/generateCoverArtwork.js63
1 files changed, 30 insertions, 33 deletions
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js
index e43963fb..76db16da 100644
--- a/src/content/dependencies/generateCoverArtwork.js
+++ b/src/content/dependencies/generateCoverArtwork.js
@@ -45,17 +45,16 @@ export default {
     switch (slots.mode) {
       case 'primary':
         return html.tag('div', {id: 'cover-art-container'}, [
-          relations.image
-            .slots({
-              path: slots.path,
-              alt: slots.alt,
-              color: slots.color,
-              thumb: 'medium',
-              id: 'cover-art',
-              reveal: true,
-              link: true,
-              square: true,
-            }),
+          relations.image.slots({
+            path: slots.path,
+            alt: slots.alt,
+            color: slots.color,
+            thumb: 'medium',
+            id: 'cover-art',
+            reveal: true,
+            link: true,
+            square: true,
+          }),
 
           !empty(relations.tagLinks) &&
             html.tag('p',
@@ -68,30 +67,28 @@ export default {
           ]);
 
       case 'thumbnail':
-        return relations.image
-          .slots({
-            path: slots.path,
-            alt: slots.alt,
-            color: slots.color,
-            thumb: 'small',
-            reveal: false,
-            link: false,
-            square: true,
-          });
+        return relations.image.slots({
+          path: slots.path,
+          alt: slots.alt,
+          color: slots.color,
+          thumb: 'small',
+          reveal: false,
+          link: false,
+          square: true,
+        });
 
       case 'commentary':
-        return relations.image
-          .slots({
-            path: slots.path,
-            alt: slots.alt,
-            color: slots.color,
-            thumb: 'medium',
-            class: 'commentary-art',
-            reveal: true,
-            link: true,
-            square: true,
-            lazy: true,
-          });
+        return relations.image.slots({
+          path: slots.path,
+          alt: slots.alt,
+          color: slots.color,
+          thumb: 'medium',
+          class: 'commentary-art',
+          reveal: true,
+          link: true,
+          square: true,
+          lazy: true,
+        });
 
       default:
         return html.blank();