« 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/generateListingSidebar.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/generateListingSidebar.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/generateListingSidebar.js')
-rw-r--r--src/content/dependencies/generateListingSidebar.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/content/dependencies/generateListingSidebar.js b/src/content/dependencies/generateListingSidebar.js
index 1e5c8bf..aeac05c 100644
--- a/src/content/dependencies/generateListingSidebar.js
+++ b/src/content/dependencies/generateListingSidebar.js
@@ -2,6 +2,7 @@ export default {
   contentDependencies: [
     'generateListingIndexList',
     'generatePageSidebar',
+    'generatePageSidebarBox',
     'linkListingIndex',
   ],
 
@@ -11,6 +12,9 @@ export default {
     sidebar:
       relation('generatePageSidebar'),
 
+    sidebarBox:
+      relation('generatePageSidebarBox'),
+
     listingIndexLink:
       relation('linkListingIndex'),
 
@@ -20,10 +24,14 @@ export default {
 
   generate: (relations, {html}) =>
     relations.sidebar.slots({
-      attributes: {class: 'listing-map-sidebar-box'},
-      content: [
-        html.tag('h1', relations.listingIndexLink),
-        relations.listingIndexList.slot('mode', 'sidebar'),
+      boxes: [
+        relations.sidebarBox.slots({
+          attributes: {class: 'listing-map-sidebar-box'},
+          content: [
+            html.tag('h1', relations.listingIndexLink),
+            relations.listingIndexList.slot('mode', 'sidebar'),
+          ],
+        }),
       ],
     }),
 };