« get me outta code hell

content: generateAdditionalNamesBox: blank w/o content - 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:
author(quasar) nebula <qznebula@protonmail.com>2024-09-30 21:37:08 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-09-30 21:37:20 -0300
commitee7508da2a7f615636c8a10826db57a5e06fdafe (patch)
treee373db578a5d7e8a4b7ec9d3a36f1c480118d164 /src/content/dependencies
parentdd96f62c7423c280748df23b9a17f742ff9588c0 (diff)
content: generateAdditionalNamesBox: blank w/o content
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateAdditionalNamesBox.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/content/dependencies/generateAdditionalNamesBox.js b/src/content/dependencies/generateAdditionalNamesBox.js
index 63427c58..4f92580d 100644
--- a/src/content/dependencies/generateAdditionalNamesBox.js
+++ b/src/content/dependencies/generateAdditionalNamesBox.js
@@ -9,12 +9,19 @@ export default {
   }),
 
   generate: (relations, {html, language}) =>
-    html.tag('div', {id: 'additional-names-box'}, [
-      html.tag('p',
-        language.$('misc.additionalNames.title')),
+    html.tag('div', {id: 'additional-names-box'},
+      {[html.onlyIfContent]: true},
 
-      html.tag('ul',
-        relations.items
-          .map(item => html.tag('li', item))),
-    ]),
+      [
+        html.tag('p',
+          {[html.onlyIfSiblings]: true},
+
+          language.$('misc.additionalNames.title')),
+
+        html.tag('ul',
+          {[html.onlyIfContent]: true},
+
+          relations.items
+            .map(item => html.tag('li', item))),
+      ]),
 };