diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-07 16:01:01 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-07 20:28:00 -0300 |
commit | e7a026a9b5ccce1ccf11c37c4dcd7fbce89b05cf (patch) | |
tree | f4bba0d02652a561b2ce047f8b43dec18cdcfcdd /src/content/dependencies/generateStickyHeadingContainer.js | |
parent | 131378833ac493d009ebe2f85af7e955deba0530 (diff) |
content: many onlyIfContent, onlyIfSiblings, onlyIfOptions uses
Diffstat (limited to 'src/content/dependencies/generateStickyHeadingContainer.js')
-rw-r--r-- | src/content/dependencies/generateStickyHeadingContainer.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/content/dependencies/generateStickyHeadingContainer.js b/src/content/dependencies/generateStickyHeadingContainer.js index 9becfb26..7f271715 100644 --- a/src/content/dependencies/generateStickyHeadingContainer.js +++ b/src/content/dependencies/generateStickyHeadingContainer.js @@ -22,10 +22,17 @@ export default { html.tag('div', {class: 'content-sticky-heading-row'}, [ html.tag('h1', slots.title), - !html.isBlank(slots.cover) && - html.tag('div', {class: 'content-sticky-heading-cover-container'}, - html.tag('div', {class: 'content-sticky-heading-cover'}, - slots.cover.slot('mode', 'thumbnail'))), + html.tag('div', {class: 'content-sticky-heading-cover-container'}, + {[html.onlyIfContent]: true}, + + html.tag('div', {class: 'content-sticky-heading-cover'}, + {[html.onlyIfContent]: true}, + + // TODO: We shouldn't need to do an isBlank check here, + // but a live blank value doesn't have a slot functions, so. + (html.isBlank(slots.cover) + ? html.blank() + : slots.cover.slot('mode', 'thumbnail')))), ]), html.tag('div', {class: 'content-sticky-subheading-row'}, |