« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateArtistInfoPageChunkItem.js8
-rw-r--r--src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js4
-rw-r--r--src/strings-default.yaml14
3 files changed, 21 insertions, 5 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageChunkItem.js b/src/content/dependencies/generateArtistInfoPageChunkItem.js
index 45a39d46..cf45a37c 100644
--- a/src/content/dependencies/generateArtistInfoPageChunkItem.js
+++ b/src/content/dependencies/generateArtistInfoPageChunkItem.js
@@ -17,6 +17,11 @@ export default {
       mutable: false,
     },
 
+    citation: {
+      type: 'html',
+      mutable: false,
+    },
+
     otherArtistLinks: {
       validate: v => v.strictArrayOf(v.isHTML),
     },
@@ -71,6 +76,9 @@ export default {
             if (!html.isBlank(slots.annotation)) {
               workingCapsule += '.withAnnotation';
               workingOptions.annotation = slots.annotation;
+            } else if (!html.isBlank(slots.citation)) {
+              workingCapsule += '.withCitation';
+              workingOptions.citation = slots.citation;
             }
 
             if (workingCapsule === entryCapsule) {
diff --git a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
index 08446a2e..572eb982 100644
--- a/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
+++ b/src/content/dependencies/generateArtistInfoPageCommentaryChunkedList.js
@@ -231,7 +231,9 @@ export default {
                         type: itemTypes,
                       }).map(({item, link, annotation, type}) =>
                         item.slots({
-                          annotation:
+                          // The citation slot, instead of annotation, gives commentary
+                          // a specially custom look.
+                          citation:
                             annotation.slots({
                               mode: 'inline',
                               absorbPunctuationFollowingExternalLinks: false,
diff --git a/src/strings-default.yaml b/src/strings-default.yaml
index 791bcd22..0bfb6b4c 100644
--- a/src/strings-default.yaml
+++ b/src/strings-default.yaml
@@ -1318,7 +1318,13 @@ artistPage:
       #   thing may be described with a word or two, and that's shown
       #   in the list.
 
-      withAnnotation: "{ENTRY} ({ANNOTATION})"
+      withAnnotation: "{ENTRY} — {ANNOTATION}"
+
+      # withCitation:
+      #   For commentary entries and the like. These are usually longer
+      #   than typical annotations.
+
+      withCitation: "{ENTRY} ({CITATION})"
 
       # withArtists:
       #   This lists co-artists or co-contributors, depending on how
@@ -1326,7 +1332,7 @@ artistPage:
 
       withArtists: "{ENTRY} (with {ARTISTS})"
 
-      withArtists.withAnnotation: "{ENTRY} ({ANNOTATION}; with {ARTISTS})"
+      withArtists.withAnnotation: "{ENTRY} — {ANNOTATION} (with {ARTISTS})"
 
       # rerelease:
       #   Tracks which aren't the original release don't display co-
@@ -1335,7 +1341,7 @@ artistPage:
 
       rerelease:
         _: "{ENTRY} ({RERELEASE})"
-        withAnnotation: "{ENTRY} ({ANNOTATION}; {RERELEASE})"
+        withAnnotation: "{ENTRY} ({RERELEASE}) — {ANNOTATION}"
         term: "rerelease"
 
         firstRelease: >-
@@ -1346,7 +1352,7 @@ artistPage:
 
       firstRelease:
         _: "{ENTRY} ({FIRST_RELEASE})"
-        withAnnotation: "{ENTRY} ({ANNOTATION}; {FIRST_RELEASE})"
+        withAnnotation: "{ENTRY} ({FIRST_RELEASE}) — {ANNOTATION}"
         term: "first release"
 
         rerelease: >-