From ee7508da2a7f615636c8a10826db57a5e06fdafe Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 30 Sep 2024 21:37:08 -0300 Subject: content: generateAdditionalNamesBox: blank w/o content --- .../dependencies/generateAdditionalNamesBox.js | 21 ++++++++++++++------- 1 file 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))), + ]), }; -- cgit 1.3.0-6-gf8a5