From e7a026a9b5ccce1ccf11c37c4dcd7fbce89b05cf Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 7 Jun 2024 16:01:01 -0300 Subject: content: many onlyIfContent, onlyIfSiblings, onlyIfOptions uses --- src/content/dependencies/generateGroupInfoPage.js | 25 +++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/content/dependencies/generateGroupInfoPage.js') diff --git a/src/content/dependencies/generateGroupInfoPage.js b/src/content/dependencies/generateGroupInfoPage.js index b5b456aa..e6b0ded1 100644 --- a/src/content/dependencies/generateGroupInfoPage.js +++ b/src/content/dependencies/generateGroupInfoPage.js @@ -69,11 +69,9 @@ export default { sec.info = {}; - if (!empty(group.urls)) { - sec.info.visitLinks = - group.urls - .map(url => relation('linkExternal', url)); - } + sec.info.visitLinks = + group.urls + .map(url => relation('linkExternal', url)); if (group.description) { sec.info.description = @@ -131,14 +129,15 @@ export default { color: data.color, mainContent: [ - sec.info.visitLinks && - html.tag('p', - language.$('releaseInfo.visitOn', { - links: - language.formatDisjunctionList( - sec.info.visitLinks - .map(link => link.slot('context', 'group'))), - })), + html.tag('p', + {[html.onlyIfContent]: true}, + language.$('releaseInfo.visitOn', { + [language.onlyIfOptions]: ['links'], + links: + language.formatDisjunctionList( + sec.info.visitLinks + .map(link => link.slot('context', 'group'))), + })), html.tag('blockquote', {[html.onlyIfContent]: true}, -- cgit 1.3.0-6-gf8a5