« get me outta code hell

move around a bunch of utility functions - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/link.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-06-04 17:30:16 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-06-04 17:30:16 -0300
commitb2469c03bd4bdb29c5e80752f812203a6755c159 (patch)
tree85f951c70568457a78c25055bb600709de4214cb /src/util/link.js
parentc7e4b06ff1e899659f043ebfbd3723152b0c93d9 (diff)
move around a bunch of utility functions
Diffstat (limited to 'src/util/link.js')
-rw-r--r--src/util/link.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util/link.js b/src/util/link.js
index 107b35f..7ed5fd8 100644
--- a/src/util/link.js
+++ b/src/util/link.js
@@ -10,7 +10,14 @@
 // gener8ting just a8out any link on the site.
 
 import * as html from './html.js'
-import { getLinkThemeString } from './colors.js'
+import { getColors } from './colors.js'
+
+export function getLinkThemeString(color) {
+    if (!color) return '';
+
+    const { primary, dim } = getColors(color);
+    return `--primary-color: ${primary}; --dim-color: ${dim}`;
+}
 
 const linkHelper = (hrefFn, {color = true, attr = null} = {}) =>
     (thing, {