« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateCoverGrid.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/content/dependencies/generateCoverGrid.js b/src/content/dependencies/generateCoverGrid.js
index 970aa05c..e9f770f0 100644
--- a/src/content/dependencies/generateCoverGrid.js
+++ b/src/content/dependencies/generateCoverGrid.js
@@ -7,6 +7,7 @@ export default {
     images: {validate: v => v.arrayOf(v.isHTML)},
     links: {validate: v => v.arrayOf(v.isHTML)},
     names: {validate: v => v.arrayOf(v.isString)},
+    info: {validate: v => v.arrayOf(v.isString)},
 
     lazy: {validate: v => v.oneOf(v.isWholeNumber, v.isBoolean)},
   },
@@ -18,7 +19,8 @@ export default {
           image: slots.images,
           link: slots.links,
           name: slots.names,
-        }).map(({image, link, name}, index) =>
+          info: slots.info,
+        }).map(({image, link, name, info}, index) =>
             link.slots({
               attributes: {class: ['grid-item', 'box']},
               content: [
@@ -32,7 +34,8 @@ export default {
                       ? slots.lazy
                       : false),
                 }),
-                html.tag('span', name),
+                html.tag('span', {[html.onlyIfContent]: true}, name),
+                html.tag('span', {[html.onlyIfContent]: true}, info),
               ],
             }))));
   },