« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateFlashActGalleryPage.js2
-rw-r--r--src/content/dependencies/generateFlashActSidebar.js42
-rw-r--r--src/content/dependencies/generateFlashInfoPage.js2
3 files changed, 32 insertions, 14 deletions
diff --git a/src/content/dependencies/generateFlashActGalleryPage.js b/src/content/dependencies/generateFlashActGalleryPage.js
index 8eea58bb..17078124 100644
--- a/src/content/dependencies/generateFlashActGalleryPage.js
+++ b/src/content/dependencies/generateFlashActGalleryPage.js
@@ -85,7 +85,7 @@ export default {
 
       navBottomRowContent: relations.flashActNavAccent,
 
-      ...relations.sidebar,
+      leftSidebar: relations.sidebar,
     });
   },
 };
diff --git a/src/content/dependencies/generateFlashActSidebar.js b/src/content/dependencies/generateFlashActSidebar.js
index 674d9ff9..7c1aae7d 100644
--- a/src/content/dependencies/generateFlashActSidebar.js
+++ b/src/content/dependencies/generateFlashActSidebar.js
@@ -1,7 +1,14 @@
 import {stitchArrays} from '#sugar';
 
 export default {
-  contentDependencies: ['linkFlash', 'linkFlashAct', 'linkFlashIndex'],
+  contentDependencies: [
+    'generatePageSidebar',
+    'generatePageSidebarBox',
+    'linkFlash',
+    'linkFlashAct',
+    'linkFlashIndex',
+  ],
+
   extraDependencies: ['getColors', 'html', 'language', 'wikiData'],
 
   sprawl: ({flashActData, flashSideData}) => ({flashActData, flashSideData}),
@@ -53,6 +60,15 @@ export default {
   },
 
   relations: (relation, query, sprawl, act, _flash) => ({
+    sidebar:
+      relation('generatePageSidebar'),
+
+    currentActBox:
+      relation('generatePageSidebarBox'),
+
+    sideMapBox:
+      relation('generatePageSidebarBox'),
+
     currentActLink:
       relation('linkFlashAct', act),
 
@@ -144,21 +160,23 @@ export default {
             ])),
     ]);
 
-    const sideMapBox = {
-      class: 'flash-act-map-sidebar-box',
-      content: sideMapBoxContent,
-    };
+    const sideMapBox =
+      relations.sideMapBox.slots({
+        attributes: {class: 'flash-act-map-sidebar-box'},
+        content: sideMapBoxContent,
+      });
 
-    const currentActBox = {
-      class: 'flash-current-act-sidebar-box',
-      content: currentActBoxContent,
-    };
+    const currentActBox =
+      relations.currentActBox.slots({
+        attributes: {class: 'flash-current-act-sidebar-box'},
+        content: currentActBoxContent,
+      });
 
-    return {
-      leftSidebarMultiple:
+    return relations.sidebar.slots({
+      boxes:
         (data.isFlashActPage
           ? [sideMapBox, currentActBox]
           : [currentActBox, sideMapBox]),
-    };
+    });
   },
 };
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js
index c60f9696..b88ce982 100644
--- a/src/content/dependencies/generateFlashInfoPage.js
+++ b/src/content/dependencies/generateFlashInfoPage.js
@@ -169,7 +169,7 @@ export default {
 
       navBottomRowContent: sec.nav.flashNavAccent,
 
-      ...relations.sidebar,
+      leftSidebar: relations.sidebar,
     });
   },
 };