diff options
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 |
commit | ee7508da2a7f615636c8a10826db57a5e06fdafe (patch) | |
tree | e373db578a5d7e8a4b7ec9d3a36f1c480118d164 /src/content | |
parent | dd96f62c7423c280748df23b9a17f742ff9588c0 (diff) |
content: generateAdditionalNamesBox: blank w/o content
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateAdditionalNamesBox.js | 21 |
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))), + ]), }; |