« get me outta code hell

content, css: generateContentEntry: float-right date - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-03-26 16:33:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-03-26 16:33:44 -0300
commitfc41a2f553aa1d74cc36a91f274210cc5a872c4b (patch)
tree67c5ed1a2eddb5a5e646fb03576b952bd3b0a23c /src/content
parent7bdd6293e3b9d0cc7a4e7e4c9ab06cd990af4ad9 (diff)
content, css: generateContentEntry: float-right date
But like, better this time. It bottom aligns.
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/generateContentEntry.js106
1 files changed, 57 insertions, 49 deletions
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 &&