« get me outta code hell

data steps: experimental live JS reload infrastructure - 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>2023-03-18 20:15:37 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-03-18 20:15:37 -0300
commitc6e1a0b6fb9314186a46cf1352a8685e8aa5fe8d (patch)
tree54d9ba89a99882d635c5504262eccf31fc8f2147 /src/misc-templates.js
parent4f0d935f1dec0cece23ac661b02486f095b5ee94 (diff)
data steps: experimental live JS reload infrastructure
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js
index cbdedfe..e912c12 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -341,66 +341,6 @@ function unbound_getThemeString(color, {
   ].join('\n');
 }
 
-export const u_generateAlbumStylesheet = contentFunction({
-  extraDependencies: [
-    'to',
-  ],
-
-  data: function(album) {
-    const data = {};
-
-    data.hasWallpaper = !empty(album.wallpaperArtistContribs);
-    data.hasBanner = !empty(album.bannerArtistContribs);
-
-    if (data.hasWallpaper) {
-      data.hasWallpaperStyle = !!album.wallpaperStyle;
-      data.wallpaperPath = ['media.albumWallpaper', album.directory, album.wallpaperFileExtension];
-      data.wallpaperStyle = album.wallpaperStyle;
-    }
-
-    if (data.hasBanner) {
-      data.hasBannerStyle = !!album.bannerStyle;
-      data.bannerStyle = album.bannerStyle;
-    }
-
-    return data;
-  },
-
-  generate: function generateAlbumStylesheet(data, {to}) {
-    const wallpaperPart =
-      (data.hasWallpaper
-        ? [
-            `body::before {`,
-            `    background-image: url("${to(...data.wallpaperPath)}");`,
-            ...(data.hasWallpaperStyle
-              ? data.wallpaperStyle
-                  .split('\n')
-                  .map(line => `    ${line}`)
-              : []),
-            `}`,
-          ]
-        : []);
-
-    const bannerPart =
-      (data.hasBannerStyle
-        ? [
-            `#banner img {`,
-            ...data.bannerStyle
-              .split('\n')
-              .map(line => `    ${line}`),
-            `}`,
-          ]
-        : []);
-
-    return [
-      ...wallpaperPart,
-      ...bannerPart,
-    ]
-      .filter(Boolean)
-      .join('\n');
-  },
-});
-
 // Divided track lists
 
 function unbound_generateTrackListDividedByGroups(tracks, {