From 97f587966f6239821589bd5c137b9875e7ae29b0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 30 Apr 2024 16:41:07 -0300 Subject: content: generatePageSidebar: always use boxes slot Removes the 'content' shorthand slot, making the surface of all sidebars more predictable. --- src/content/dependencies/generateGroupSidebar.js | 25 +++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/content/dependencies/generateGroupSidebar.js') 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)), + ], + }), ], }), }; -- cgit 1.3.0-6-gf8a5