« get me outta code hell

content: generateCoverArtwork: mode commentary - 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-06-06 20:07:03 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-06 08:26:55 -0300
commit461f651847270898d568c4d1666158389076db82 (patch)
tree4b8dfddb9ab92870bb9e9d29cc7b9e7354ea584c
parent247cb6a67617ff5f70417c2b93a245126b2d4384 (diff)
content: generateCoverArtwork: mode commentary
-rw-r--r--src/content/dependencies/generateCoverArtwork.js14
-rw-r--r--src/static/site4.css11
2 files changed, 24 insertions, 1 deletions
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js
index 392d8c2..66722d7 100644
--- a/src/content/dependencies/generateCoverArtwork.js
+++ b/src/content/dependencies/generateCoverArtwork.js
@@ -32,7 +32,7 @@ export default {
     },
 
     mode: {
-      validate: v => v.is('primary', 'thumbnail'),
+      validate: v => v.is('primary', 'thumbnail', 'commentary'),
       default: 'primary',
     },
   },
@@ -73,6 +73,18 @@ export default {
             square: true,
           });
 
+      case 'commentary':
+        return relations.image
+          .slots({
+            path: slots.path,
+            alt: slots.alt,
+            thumb: 'medium',
+            class: 'commentary-art',
+            reveal: true,
+            link: true,
+            square: true,
+          });
+
       default:
         return html.blank();
     }
diff --git a/src/static/site4.css b/src/static/site4.css
index 8fb7176..40516e7 100644
--- a/src/static/site4.css
+++ b/src/static/site4.css
@@ -568,6 +568,13 @@ p .current {
   margin-top: 5px;
 }
 
+.commentary-art {
+  float: right;
+  width: 30%;
+  max-width: 250px;
+  margin: 15px 0 10px 20px;
+}
+
 .js-hide,
 .js-show-once-data,
 .js-hide-once-data {
@@ -1288,6 +1295,10 @@ html[data-url-key="localized.home"] .carousel-container {
   animation-delay: 125ms;
 }
 
+h3.content-heading {
+  clear: both;
+}
+
 /* This animation's name is referenced in JavaScript */
 @keyframes highlight-hash-link {
   0% {