« get me outta code hell

content, css, data: Track.nameDetail - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generatePageTitleText.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-11 19:06:52 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-11 19:10:31 -0300
commit1af00437b5f4397b0338ca1a64cf36e8c26cfb68 (patch)
tree1693c6d71e1736c1788e7a2186ccad6d3d61d15a /src/content/dependencies/generatePageTitleText.js
parent657e1c1e447ad8939d2ad9286af00be52975f791 (diff)
content, css, data: Track.nameDetail
Diffstat (limited to 'src/content/dependencies/generatePageTitleText.js')
-rw-r--r--src/content/dependencies/generatePageTitleText.js27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/content/dependencies/generatePageTitleText.js b/src/content/dependencies/generatePageTitleText.js
index 5482ca91..112112e6 100644
--- a/src/content/dependencies/generatePageTitleText.js
+++ b/src/content/dependencies/generatePageTitleText.js
@@ -14,6 +14,11 @@ export default {
       mutable: false,
     },
 
+    detail: {
+      type: 'html',
+      mutable: false,
+    },
+
     showWikiNameInTitle: {
       validate: v => v.is(true, false, 'auto'),
       default: 'auto',
@@ -38,9 +43,18 @@ export default {
       // so we wrap the title in a tag and pass it off as good to go.
       workingOptions.title =
         html.tags([
-striptags(slots.title.toString()),
+          striptags(slots.title.toString()),
         ]);
 
+      if (!html.isBlank(slots.detail)) {
+        // Same shenanigans here, as far as wrapping striptags goes.
+        workingCapsule += '.withDetail';
+        workingOptions.detail =
+          html.tags([
+            striptags(slots.detail.toString()),
+          ]);
+      }
+
       if (!html.isBlank(slots.subtitle)) {
         // Same shenanigans here, as far as wrapping striptags goes.
         workingCapsule += '.withSubtitle';
@@ -52,10 +66,13 @@ striptags(slots.title.toString()),
 
       const showWikiName =
         (slots.showWikiNameInTitle === true
-? true
+          ? true
+
        : slots.showWikiNameInTitle === 'auto'
-? html.isBlank(slots.subtitle)
-: false);
+          ? html.isBlank(slots.subtitle) &&
+            html.isBlank(slots.detail)
+
+          : false);
 
       if (showWikiName) {
         workingCapsule += '.withWikiName';
@@ -64,4 +81,4 @@ striptags(slots.title.toString()),
 
       return language.$(workingCapsule, workingOptions);
     }),
-};
\ No newline at end of file
+};