diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-04-03 18:11:12 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-04-03 18:11:12 -0300 |
commit | 9aca91f5d0999ac513ebcdf7a5c74ecd952c7864 (patch) | |
tree | b6e14d9a889b02306246d3b1adbd626e14d5fb46 /src/content/dependencies/generateListingSidebar.js | |
parent | 73111fd73013d8de6403cafa33416a23ad17058c (diff) |
content: generateListingPage: base on generatePageSidebar
Diffstat (limited to 'src/content/dependencies/generateListingSidebar.js')
-rw-r--r-- | src/content/dependencies/generateListingSidebar.js | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/content/dependencies/generateListingSidebar.js b/src/content/dependencies/generateListingSidebar.js index 1cdd236..1e5c8bf 100644 --- a/src/content/dependencies/generateListingSidebar.js +++ b/src/content/dependencies/generateListingSidebar.js @@ -1,21 +1,29 @@ export default { - contentDependencies: ['generateListingIndexList', 'linkListingIndex'], + contentDependencies: [ + 'generateListingIndexList', + 'generatePageSidebar', + 'linkListingIndex', + ], + extraDependencies: ['html'], - relations(relation, currentListing) { - return { - listingIndexLink: relation('linkListingIndex'), - listingIndexList: relation('generateListingIndexList', currentListing), - }; - }, + relations: (relation, currentListing) => ({ + sidebar: + relation('generatePageSidebar'), + + listingIndexLink: + relation('linkListingIndex'), + + listingIndexList: + relation('generateListingIndexList', currentListing), + }), - generate(relations, {html}) { - return { - leftSidebarClass: 'listing-map-sidebar-box', - leftSidebarContent: [ + generate: (relations, {html}) => + relations.sidebar.slots({ + attributes: {class: 'listing-map-sidebar-box'}, + content: [ html.tag('h1', relations.listingIndexLink), relations.listingIndexList.slot('mode', 'sidebar'), ], - }; - }, + }), }; |