diff options
Diffstat (limited to 'src/content/dependencies/generateWikiHomePage.js')
-rw-r--r-- | src/content/dependencies/generateWikiHomePage.js | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/content/dependencies/generateWikiHomePage.js b/src/content/dependencies/generateWikiHomePage.js index 36fcc6f2..35461d03 100644 --- a/src/content/dependencies/generateWikiHomePage.js +++ b/src/content/dependencies/generateWikiHomePage.js @@ -1,6 +1,8 @@ export default { contentDependencies: [ 'generatePageLayout', + 'generatePageSidebar', + 'generatePageSidebarBox', 'generateWikiHomeAlbumsRow', 'generateWikiHomeNewsBox', 'transformContent', @@ -22,7 +24,13 @@ export default { relations.layout = relation('generatePageLayout'); + relations.sidebar = + relation('generatePageSidebar'); + if (homepageLayout.sidebarContent) { + relations.customSidebarBox = + relation('generatePageSidebarBox'); + relations.customSidebarContent = relation('transformContent', homepageLayout.sidebarContent); } @@ -69,21 +77,23 @@ export default { relations.contentRows, ], - leftSidebarCollapse: false, - leftSidebarWide: true, - - leftSidebarMultiple: [ - (relations.customSidebarContent - ? { - class: 'custom-content-sidebar-box', - content: - relations.customSidebarContent - .slot('mode', 'multiline'), - } - : null), - - relations.newsSidebarBox ?? null, - ], + leftSidebar: + relations.sidebar.slots({ + collapse: false, + wide: true, + + boxes: [ + relations.customSidebarContent && + relations.customSidebarBox.slots({ + attributes: {class: 'custom-content-sidebar-box'}, + content: + relations.customSidebarContent + .slot('mode', 'multiline'), + }), + + relations.newsSidebarBox, + ], + }), navLinkStyle: 'index', navLinks: [ |