« get me outta code hell

restore custom wallpaper styles - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-09-15 23:56:14 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-09-15 23:56:14 -0300
commit1738f92b4ed82dd1bb8d361f66c7474322b0c16f (patch)
treecf9459770e38531e80dc7814cb19ba55f17d2cfa /src
parent1150d51a67cc4c9918e9b5e8b28a28c877d58f01 (diff)
restore custom wallpaper styles
Diffstat (limited to 'src')
-rw-r--r--src/misc-templates.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 932b3dad..62f41c5f 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -301,6 +301,7 @@ export function getThemeString(color, additionalVariables = []) {
 
 export function getAlbumStylesheet(album, {to}) {
   const hasWallpaper = album.wallpaperArtistContribs.length >= 1;
+  const hasWallpaperStyle = !!album.wallpaperStyle;
   const hasBannerStyle = !!album.bannerStyle;
 
   const wallpaperSource =
@@ -314,7 +315,12 @@ export function getAlbumStylesheet(album, {to}) {
     (hasWallpaper
       ? [
           `body::before {`,
-          `    background-image: url("${wallpaperSource}")`,
+          `    background-image: url("${wallpaperSource}");`,
+          ...html.fragment(
+            hasWallpaperStyle &&
+              album.wallpaperStyle
+              .split('\n')
+              .map(line => `    ${line}`)),
           `}`,
         ]
       : []);