diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-11-09 16:34:15 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-11-09 16:34:15 -0400 |
commit | f187e32c858e46af9ee2717a20ae4095f0fef325 (patch) | |
tree | 2febbd8c4fdb23d1a668358eb806b1489761a8f9 | |
parent | 869548723002ebf2f3a501c4105cdf6db7ac8aa7 (diff) |
content: generateListingPage: add chunkTitleAccents slot
-rw-r--r-- | src/content/dependencies/generateListingPage.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/content/dependencies/generateListingPage.js b/src/content/dependencies/generateListingPage.js index 6eee45b8..b3d6899d 100644 --- a/src/content/dependencies/generateListingPage.js +++ b/src/content/dependencies/generateListingPage.js @@ -78,6 +78,10 @@ export default { validate: v => v.strictArrayOf(v.isObject), }, + chunkTitleAccents: { + validate: v => v.strictArrayOf(v.optional(v.isObject)), + }, + chunkRows: { validate: v => v.strictArrayOf(v.isObject), }, @@ -218,10 +222,11 @@ export default { stitchArrays({ title: slots.chunkTitles, + titleAccent: slots.chunkTitleAccents, id: slots.chunkIDs, rows: slots.chunkRows, rowAttributes: slots.chunkRowAttributes, - }).map(({title, id, rows, rowAttributes}) => [ + }).map(({title, titleAccent, id, rows, rowAttributes}) => [ relations.chunkHeading .clone() .slots({ @@ -233,6 +238,13 @@ export default { context: 'chunk.title', provided: title, }), + + accent: + titleAccent && + formatListingString({ + context: ['chunk.title', title.stringsKey, 'accent'], + provided: titleAccent, + }), }), html.tag('dd', |