« get me outta code hell

content: generatePageSidebar: always use boxes slot - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateAlbumCommentaryPage.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-30 16:41:07 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-01 20:22:38 -0300
commit97f587966f6239821589bd5c137b9875e7ae29b0 (patch)
treeabdcc2667570653e6a953db037ac773e33a69233 /src/content/dependencies/generateAlbumCommentaryPage.js
parent2db051ee51213666ddb2045a3c6b0a2e60475798 (diff)
content: generatePageSidebar: always use boxes slot
Removes the 'content' shorthand slot, making the surface of
all sidebars more predictable.
Diffstat (limited to 'src/content/dependencies/generateAlbumCommentaryPage.js')
-rw-r--r--src/content/dependencies/generateAlbumCommentaryPage.js29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/content/dependencies/generateAlbumCommentaryPage.js b/src/content/dependencies/generateAlbumCommentaryPage.js
index 751a0c9..7879269 100644
--- a/src/content/dependencies/generateAlbumCommentaryPage.js
+++ b/src/content/dependencies/generateAlbumCommentaryPage.js
@@ -2,15 +2,14 @@ import {empty, stitchArrays} from '#sugar';
 
 export default {
   contentDependencies: [
+    'generateAlbumCommentarySidebar',
     'generateAlbumCoverArtwork',
     'generateAlbumNavAccent',
-    'generateAlbumSidebarTrackSection',
     'generateAlbumStyleRules',
     'generateCommentaryEntry',
     'generateContentHeading',
     'generateTrackCoverArtwork',
     'generatePageLayout',
-    'generatePageSidebar',
     'linkAlbum',
     'linkExternal',
     'linkTrack',
@@ -25,7 +24,7 @@ export default {
       relation('generatePageLayout');
 
     relations.sidebar =
-      relation('generatePageSidebar');
+      relation('generateAlbumCommentarySidebar', album);
 
     relations.albumStyleRules =
       relation('generateAlbumStyleRules', album, null);
@@ -86,13 +85,6 @@ export default {
           track.commentary
             .map(entry => relation('generateCommentaryEntry', entry)));
 
-    relations.sidebarAlbumLink =
-      relation('linkAlbum', album);
-
-    relations.sidebarTrackSections =
-      album.trackSections.map(trackSection =>
-        relation('generateAlbumSidebarTrackSection', album, null, trackSection));
-
     return relations;
   },
 
@@ -253,22 +245,7 @@ export default {
           },
         ],
 
-        leftSidebar:
-          relations.sidebar.slots({
-            attributes: {class: 'commentary-track-list-sidebar-box'},
-
-            stickyMode: 'column',
-
-            content: [
-              html.tag('h1', relations.sidebarAlbumLink),
-              relations.sidebarTrackSections.map(section =>
-                section.slots({
-                  anchor: true,
-                  open: true,
-                  mode: 'commentary',
-                })),
-            ],
-          }),
+        leftSidebar: relations.sidebar,
       });
   },
 };