CSS vars to control graph colors (#77)

* css vars to control graph colors

* moved variable positions
This commit is contained in:
Utsob Roy 2023-02-17 21:17:16 +06:00 committed by GitHub
parent 27d71e8ca7
commit 11b837c01a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -56,8 +56,8 @@
height = el.offsetHeight; height = el.offsetHeight;
const highlightNodes = new Set(); const highlightNodes = new Set();
let hoverNode = null; let hoverNode = null;
const color = getCssVar("--text-accent"); const color = getCssVar("--graph-main");
const mutedColor = getCssVar("--text-muted"); const mutedColor = getCssVar("--graph-muted");
let Graph = ForceGraph() let Graph = ForceGraph()
(el) (el)

View File

@ -9,6 +9,8 @@ body {
--note-icon-2: url(/img/tree-2.svg); --note-icon-2: url(/img/tree-2.svg);
--note-icon-3: url(/img/tree-3.svg); --note-icon-3: url(/img/tree-3.svg);
--note-icon-fallback: url(/img/default-note-icon.svg); --note-icon-fallback: url(/img/default-note-icon.svg);
--graph-main: var(--text-accent);
--graph-muted: var(--text-muted);
} }
.content { .content {