« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateArtTagGalleryPage.js17
-rw-r--r--src/strings-default.yaml8
2 files changed, 18 insertions, 7 deletions
diff --git a/src/content/dependencies/generateArtTagGalleryPage.js b/src/content/dependencies/generateArtTagGalleryPage.js
index a0b3a0e5..a67e40e6 100644
--- a/src/content/dependencies/generateArtTagGalleryPage.js
+++ b/src/content/dependencies/generateArtTagGalleryPage.js
@@ -126,11 +126,18 @@ export default {
           relations.quickDescription,
 
           html.tag('p', {class: 'quick-info'},
-            language.$(pageCapsule, 'infoLine', {
-              coverArts: language.countArtworks(data.numArtworks, {
-                unit: true,
-              }),
-            })),
+            language.encapsulate(pageCapsule, 'infoLine', capsule =>
+              (data.numArtworks === 0
+                ? language.encapsulate(capsule, 'notFeatured', capsule => [
+                    language.$(capsule),
+                    html.tag('br'),
+                    language.$(capsule, 'callToAction'),
+                  ])
+                : language.$(capsule, {
+                    coverArts: language.countArtworks(data.numArtworks, {
+                      unit: true,
+                    }),
+                  })))),
 
           relations.ancestorLinks &&
             html.tag('p', {class: 'quick-info'},
diff --git a/src/strings-default.yaml b/src/strings-default.yaml
index a552febd..5834facd 100644
--- a/src/strings-default.yaml
+++ b/src/strings-default.yaml
@@ -1336,8 +1336,12 @@ artTagInfoPage:
 artTagGalleryPage:
   title: "{TAG}"
 
-  infoLine: >-
-    Appears in {COVER_ARTS}.
+  infoLine:
+    _: "Featured in {COVER_ARTS}."
+
+    notFeatured:
+      _: "This tag hasn't been featured in any artworks yet."
+      callToAction: "Maybe your track will be the first!"
 
   descendsFrom: "Descends from {TAGS}."
   descendants: "Direct descendants: {TAGS}."