From 1af00437b5f4397b0338ca1a64cf36e8c26cfb68 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 11 May 2026 19:06:52 -0300 Subject: content, css, data: Track.nameDetail --- src/content/dependencies/generatePageTitleText.js | 27 ++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/content/dependencies/generatePageTitleText.js') 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 +}; -- cgit 1.3.0-6-gf8a5