« 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/generateGroupSidebar.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/generateGroupSidebar.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/generateGroupSidebar.js')
-rw-r--r--src/content/dependencies/generateGroupSidebar.js25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/content/dependencies/generateGroupSidebar.js b/src/content/dependencies/generateGroupSidebar.js
index 3abb3392..0888cbbe 100644
--- a/src/content/dependencies/generateGroupSidebar.js
+++ b/src/content/dependencies/generateGroupSidebar.js
@@ -2,6 +2,7 @@ export default {
   contentDependencies: [
     'generateGroupSidebarCategoryDetails',
     'generatePageSidebar',
+    'generatePageSidebarBox',
   ],
 
   extraDependencies: ['html', 'language', 'wikiData'],
@@ -12,6 +13,9 @@ export default {
     sidebar:
       relation('generatePageSidebar'),
 
+    sidebarBox:
+      relation('generatePageSidebarBox'),
+
     categoryDetails:
       sprawl.groupCategoryData.map(category =>
         relation('generateGroupSidebarCategoryDetails', category, group)),
@@ -25,15 +29,18 @@ export default {
 
   generate: (relations, slots, {html, language}) =>
     relations.sidebar.slots({
-      attributes: {class: 'category-map-sidebar-box'},
-
-      content: [
-        html.tag('h1',
-          language.$('groupSidebar.title')),
-
-        relations.categoryDetails
-          .map(details =>
-            details.slot('currentExtra', slots.currentExtra)),
+      boxes: [
+        relations.sidebarBox.slots({
+          attributes: {class: 'category-map-sidebar-box'},
+          content: [
+            html.tag('h1',
+              language.$('groupSidebar.title')),
+
+            relations.categoryDetails
+              .map(details =>
+                details.slot('currentExtra', slots.currentExtra)),
+          ],
+        }),
       ],
     }),
 };