From fc41a2f553aa1d74cc36a91f274210cc5a872c4b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 26 Mar 2026 16:33:44 -0300 Subject: content, css: generateContentEntry: float-right date But like, better this time. It bottom aligns. --- src/content/dependencies/generateContentEntry.js | 106 ++++++++++++----------- 1 file changed, 57 insertions(+), 49 deletions(-) (limited to 'src/content/dependencies') diff --git a/src/content/dependencies/generateContentEntry.js b/src/content/dependencies/generateContentEntry.js index 80a155fe..c77f744a 100644 --- a/src/content/dependencies/generateContentEntry.js +++ b/src/content/dependencies/generateContentEntry.js @@ -49,58 +49,66 @@ export default { !html.isBlank(relations.date) && {class: 'dated'}, - language.encapsulate(entryCapsule, 'title', titleCapsule => [ - html.tag('span', {class: 'content-entry-heading-text'}, - language.encapsulate(titleCapsule, workingCapsule => { - const workingOptions = {}; - - const artists = - html.tag('span', {class: 'content-entry-artists'}, - {[html.onlyIfContent]: true}, - - (relations.artistsContent - ? relations.artistsContent.slot('mode', 'inline') - : relations.artistLinks - ? language.formatConjunctionList(relations.artistLinks) - : html.blank())); - - if (!html.isBlank(artists)) { - workingCapsule += '.withArtists'; - workingOptions.artists = artists; - } - - const annotation = - html.tag('span', {class: 'content-entry-annotation'}, - {[html.onlyIfContent]: true}, - - (relations.annotationContent - ? relations.annotationContent.slots({ - mode: 'inline', - absorbPunctuationFollowingExternalLinks: false, - }) - : html.blank())); - - if (!html.isBlank(annotation)) { - if (html.isBlank(artists)) { - workingCapsule += '.withAnnotation'; - workingOptions.annotation = annotation; - } else { - workingCapsule += '.withAccent'; - workingOptions.accent = - html.tag('span', {class: 'content-entry-accent'}, - language.$(titleCapsule, 'accent.withAnnotation', {annotation})); - - if (data.isWikiEditorEntry) { - workingCapsule += '.wikiEditor'; - } + html.tag('span', {class: 'content-entry-heading-inner-box'}, + language.encapsulate(entryCapsule, 'title', titleCapsule => [ + html.tags([ + html.tag('span', {class: 'float-spacer'}, + {[html.onlyIfSiblings]: true}), + + relations.date, + ]), + + html.tag('span', {class: 'content-entry-heading-text'}, + language.encapsulate(titleCapsule, workingCapsule => { + const workingOptions = {}; + + const artists = + html.tag('span', {class: 'content-entry-artists'}, + {[html.onlyIfContent]: true}, + + (relations.artistsContent + ? relations.artistsContent.slot('mode', 'inline') + : relations.artistLinks + ? language.formatConjunctionList(relations.artistLinks) + : html.blank())); + + if (!html.isBlank(artists)) { + workingCapsule += '.withArtists'; + workingOptions.artists = artists; + } + + let annotation = html.blank(); + if (relations.annotationContent) { + relations.annotationContent.slots({ + mode: 'inline', + absorbPunctuationFollowingExternalLinks: false, + }); + + annotation = + html.tag('span', {class: 'content-entry-annotation'}, + html.metatag('chunkwrap', {split: ','}, + relations.annotationContent)); } - } - return language.$(workingCapsule, workingOptions); - })), + if (!html.isBlank(annotation)) { + if (html.isBlank(artists)) { + workingCapsule += '.withAnnotation'; + workingOptions.annotation = annotation; + } else { + workingCapsule += '.withAccent'; + workingOptions.accent = + html.tag('span', {class: 'content-entry-accent'}, + language.$(titleCapsule, 'accent.withAnnotation', {annotation})); + + if (data.isWikiEditorEntry) { + workingCapsule += '.wikiEditor'; + } + } + } - relations.date, - ])), + return language.$(workingCapsule, workingOptions); + })), + ]))), html.tag('blockquote', {class: 'content-entry-body'}, slots.color && -- cgit 1.3.0-6-gf8a5