« get me outta code hell

content, css: generateAdditionalFilesListChunk: description in li - 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-04-04 11:46:21 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-04 11:46:21 -0300
commit48a57e64e705624a219b140fb88fcf295329deb5 (patch)
treebc4dac3ac2a9f0def1943bed106913eebeada1bb /src/content
parent8d655f592df09a15537fd2275cd9c51b5af78d01 (diff)
content, css: generateAdditionalFilesListChunk: description in li
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateAdditionalFilesListChunk.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/content/dependencies/generateAdditionalFilesListChunk.js b/src/content/dependencies/generateAdditionalFilesListChunk.js
index d0a603a8..5804115a 100644
--- a/src/content/dependencies/generateAdditionalFilesListChunk.js
+++ b/src/content/dependencies/generateAdditionalFilesListChunk.js
@@ -18,29 +18,28 @@ export default {
   },
 
   generate(slots, {html, language}) {
-    const titleParts = ['releaseInfo.additionalFiles.entry'];
-    const titleOptions = {
-      title:
-        html.tag('span', {class: 'group-name'},
-          slots.title),
-    };
-
-    if (!html.isBlank(slots.description)) {
-      titleParts.push('withDescription');
-      titleOptions.description = slots.description;
-    }
-
     const summary =
       html.tag('summary',
         html.tag('span',
-          language.$(...titleParts, titleOptions)));
+          language.$('releaseInfo.additionalFiles.entry', {
+            title:
+              html.tag('span', {class: 'group-name'},
+                slots.title),
+          })));
+
+    const description =
+      html.tag('li', {class: 'entry-description'},
+        {[html.onlyIfContent]: true},
+        slots.description);
+
+    const items =
+      (html.isBlank(slots.items)
+        ? html.tag('li',
+            language.$('releaseInfo.additionalFiles.entry.noFilesAvailable'))
+        : slots.items);
 
     const content =
-      html.tag('ul',
-        (html.isBlank(slots.items)
-          ? html.tag('li',
-              language.$('releaseInfo.additionalFiles.entry.noFilesAvailable'))
-          : slots.items));
+      html.tag('ul', [description, items]);
 
     const details =
       html.tag('details',