From 4e11adf60b74db6a69fcebbf07dcd7c8e8b00a20 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 29 Mar 2024 14:24:45 -0300 Subject: content, client: linkContribution: platform info in tooltips --- src/content/dependencies/linkContribution.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js index cb57aa47..c69a5b48 100644 --- a/src/content/dependencies/linkContribution.js +++ b/src/content/dependencies/linkContribution.js @@ -1,4 +1,4 @@ -import {empty} from '#sugar'; +import {empty, stitchArrays} from '#sugar'; export default { contentDependencies: [ @@ -34,6 +34,7 @@ export default { data(contribution) { return { what: contribution.what, + urls: contribution.who.urls, }; }, @@ -74,12 +75,21 @@ export default { {[html.joinChildren]: ''}, content: - relations.artistIcons - .map(icon => + stitchArrays({ + icon: relations.artistIcons, + url: data.urls, + }).map(({icon, url}) => [ icon.slots({ context: 'artist', withText: true, - })), + }), + + html.tag('span', {class: 'icon-platform'}, + language.formatExternalLink(url, { + context: 'artist', + style: 'platform', + })), + ]), }), }) : relations.artistLink); -- cgit 1.3.0-6-gf8a5