From d01dda56dbd80f2aad9973201c27ed23b23162c3 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 30 Apr 2024 21:45:59 -0300 Subject: content, client, css: search results hover cue --- src/static/js/client.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/static/js') 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'); -- cgit 1.3.0-6-gf8a5