« get me outta code hell

content: linkTemplate: append provided style to own style - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-29 09:49:56 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-29 09:49:56 -0300
commit777fbd3535f80fb8fb28d80a5dc53efe44c6cb82 (patch)
tree216e1176937a8007b762c68ed9f045190442102b /src/content
parentc59545f5faafc826ff24ff779c20318ef14ae123 (diff)
content: linkTemplate: append provided style to own style
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/linkTemplate.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/content/dependencies/linkTemplate.js b/src/content/dependencies/linkTemplate.js
index d9af726c..a361a4e7 100644
--- a/src/content/dependencies/linkTemplate.js
+++ b/src/content/dependencies/linkTemplate.js
@@ -64,6 +64,14 @@ export default {
       style = `--primary-color: ${primary}; --dim-color: ${dim}`;
     }
 
+    if (slots.attributes?.style) {
+      if (style) {
+        style += '; ' + slots.attributes.style;
+      } else {
+        style = slots.attributes.style;
+      }
+    }
+
     if (slots.tooltip) {
       title = slots.tooltip;
     }