« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/linkContribution.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/content/dependencies/linkContribution.js b/src/content/dependencies/linkContribution.js
index 64382a57..f3d6e4f2 100644
--- a/src/content/dependencies/linkContribution.js
+++ b/src/content/dependencies/linkContribution.js
@@ -1,7 +1,12 @@
 import {empty} from '#sugar';
 
 export default {
-  contentDependencies: ['linkArtist', 'linkExternalAsIcon'],
+  contentDependencies: [
+    'generateTooltip',
+    'linkArtist',
+    'linkExternalAsIcon',
+  ],
+
   extraDependencies: ['html', 'language'],
 
   relations(relation, contribution) {
@@ -10,6 +15,9 @@ export default {
     relations.artistLink =
       relation('linkArtist', contribution.who);
 
+    relations.tooltip =
+      relation('generateTooltip');
+
     if (!empty(contribution.who.urls)) {
       relations.artistIcons =
         contribution.who.urls
@@ -64,19 +72,21 @@ export default {
     if (hasExternalIcons && slots.iconMode === 'tooltip') {
       content = [
         content,
-        html.tag('span', {class: ['icons', 'tooltip', 'icons-tooltip']},
-          {[html.noEdgeWhitespace]: true},
+        relations.tooltip.slots({
+          attributes:
+            {class: ['icons', 'icons-tooltip']},
 
-          html.tag('span', {class: 'tooltip-content'},
-            {[html.noEdgeWhitespace]: true},
+          contentAttributes:
             {[html.joinChildren]: ''},
 
+          content:
             relations.artistIcons
               .map(icon =>
                 icon.slots({
                   context: 'artist',
                   withText: true,
-                })))),
+                })),
+        }),
       ];
     }