« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 2614aac9..22752692 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -4,8 +4,6 @@
 
 import {Track, Album} from './data/things.js';
 
-import {getColors} from './util/colors.js';
-
 import {
   empty,
   unique,
@@ -297,15 +295,29 @@ function unbound_generateCoverLink({
 
 // CSS & color shenanigans
 
-function unbound_getThemeString(color, additionalVariables = []) {
+function unbound_getThemeString(color, {
+  getColors,
+
+  additionalVariables = [],
+} = {}) {
   if (!color) return '';
 
-  const {primary, dim, bg} = getColors(color);
+  const {
+    primary,
+    dark,
+    dim,
+    bg,
+    bgBlack,
+    shadow,
+  } = getColors(color);
 
   const variables = [
     `--primary-color: ${primary}`,
+    `--dark-color: ${dark}`,
     `--dim-color: ${dim}`,
     `--bg-color: ${bg}`,
+    `--bg-black-color: ${bgBlack}`,
+    `--shadow-color: ${shadow}`,
     ...additionalVariables,
   ].filter(Boolean);