« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateAlbumInfoPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateAlbumInfoPage.js')
-rw-r--r--src/content/dependencies/generateAlbumInfoPage.js30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js
index d1be0f3a..a0f14c9a 100644
--- a/src/content/dependencies/generateAlbumInfoPage.js
+++ b/src/content/dependencies/generateAlbumInfoPage.js
@@ -6,6 +6,7 @@ export default {
   contentDependencies: [
     'generateAdditionalFilesShortcut',
     'generateAlbumAdditionalFilesList',
+    'generateAlbumBanner',
     'generateAlbumCoverArtwork',
     'generateAlbumNavAccent',
     'generateAlbumReleaseInfo',
@@ -75,6 +76,11 @@ export default {
         relation('generateAlbumCoverArtwork', album);
     }
 
+    if (album.hasBannerArt) {
+      relations.banner =
+        relation('generateAlbumBanner', album);
+    }
+
     // Section: Release info
 
     relations.releaseInfo =
@@ -157,11 +163,11 @@ export default {
         additionalStyleRules: [relations.albumStyleRules],
 
         cover:
-          (relations.cover
-            ? relations.cover.slots({
-                alt: language.$('misc.alt.albumCover'),
-              })
-            : null),
+          relations.cover
+            ?.slots({
+              alt: language.$('misc.alt.albumCover'),
+            })
+            ?? null,
 
         mainContent: [
           relations.releaseInfo,
@@ -263,6 +269,9 @@ export default {
             ],
           }),
 
+        banner: relations.banner ?? null,
+        bannerPosition: 'top',
+
         ...relations.sidebar,
 
         // socialEmbed: relations.socialEmbed,
@@ -271,17 +280,6 @@ export default {
 };
 
 /*
-  banner: !empty(album.bannerArtistContribs) && {
-    dimensions: album.bannerDimensions,
-    path: [
-      'media.albumBanner',
-      album.directory,
-      album.bannerFileExtension,
-    ],
-    alt: language.$('misc.alt.albumBanner'),
-    position: 'top',
-  },
-
   secondaryNav: generateAlbumSecondaryNav(album, null, {
     getLinkThemeString,
     html,