« get me outta code hell

content, client, css: search results hover cue - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-30 21:45:59 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:46 -0300
commitd01dda56dbd80f2aad9973201c27ed23b23162c3 (patch)
treefd830edf0ad67f6a11cef7c962613b308dfd0378 /src/static/js
parent6dbf976005f097b3737aa87d2d09239f7a37f330 (diff)
content, client, css: search results hover cue
Diffstat (limited to 'src/static/js')
-rw-r--r--src/static/js/client.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index 0a4dc0ff..93cbb902 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -5,6 +5,7 @@
 // that cannot 8e done at static-site compile time, 8y its fundamentally
 // ephemeral nature.
 
+import {getColors} from '../shared-util/colors.js';
 import {accumulateSum, atOffset, empty, filterMultipleArrays, stitchArrays}
   from '../shared-util/sugar.js';
 
@@ -3545,6 +3546,13 @@ function showSidebarSearchResults(results) {
     link.setAttribute('href', openTrack(result.directory));
     cssProp(link, '--primary-color', result.data.color);
 
+    try {
+      const colors = getColors(result.data.color, {chroma});
+      cssProp(link, '--light-ghost-color', colors.lightGhost);
+    } catch (error) {
+      console.warn(error);
+    }
+
     const span = document.createElement('span');
     span.classList.add('wiki-search-result-name');