« get me outta code hell

redesign & refinements for sticky layouting - 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:
author(quasar) nebula <qznebula@protonmail.com>2022-11-27 22:49:16 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-11-27 22:49:16 -0400
commit5206ac7188c9eefd6f1d18050e2831b0f10be8ef (patch)
tree75c0f8ad55cd7771182ba64aa146104e5a5049ef /src/misc-templates.js
parentfb5859f083687b477b8e65e0e4de56baf4b35a98 (diff)
redesign & refinements for sticky layouting
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 2614aac..2275269 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);