diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-14 00:00:13 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-08-14 00:00:13 -0300 |
commit | be094714ca09607db32274bf2aa66e6d5bd59722 (patch) | |
tree | 7d0e7bf3edcfbf951b8b5761ac4c1dab2a4cc4fc | |
parent | a080fff517a78cf272030e0d3bffd777391518c2 (diff) |
content: generatePageLayout: present sidebars in skipper properly data-steps
-rw-r--r-- | src/content/dependencies/generatePageLayout.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index cc74a600..67cb9d95 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -377,18 +377,18 @@ export default { content)); } + if (html.isBlank(sidebarContent)) { + return html.blank(); + } + return html.tag('div', - { - [html.onlyIfContent]: true, - id, - class: [ - 'sidebar-column', - wide && 'wide', - !collapse && 'no-hide', - stickyMode !== 'static' && `sticky-${stickyMode}`, - ...sidebarClasses, - ], - }, + {id, class: [ + 'sidebar-column', + wide && 'wide', + !collapse && 'no-hide', + stickyMode !== 'static' && `sticky-${stickyMode}`, + ...sidebarClasses, + ]}, sidebarContent); } @@ -422,20 +422,20 @@ export default { processSkippers([ {condition: true, id: 'content', string: 'content'}, { - condition: sidebarLeftHTML, + condition: !html.isBlank(sidebarLeftHTML), id: 'sidebar-left', string: - (sidebarRightHTML - ? 'sidebar.left' - : 'sidebar'), + (html.isBlank(sidebarRightHTML) + ? 'sidebar' + : 'sidebar.left'), }, { - condition: sidebarRightHTML, + condition: !html.isBlank(sidebarRightHTML), id: 'sidebar-right', string: - (sidebarLeftHTML - ? 'sidebar.right' - : 'sidebar'), + (html.isBlank(sidebarLeftHTML) + ? 'sidebar' + : 'sidebar.right'), }, {condition: navHTML, id: 'header', string: 'header'}, {condition: footerHTML, id: 'footer', string: 'footer'}, |