diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-02-08 23:36:30 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-02-25 20:03:29 -0400 |
commit | 8051e450166464e533e80c84133de30ac3beda87 (patch) | |
tree | c830feb150663dc7353ed162a70a3f045c4911f0 /src/content/dependencies | |
parent | 9251eb1af5dfbd87bbaa5aaa373dd1be162835fb (diff) |
content, data: related art tags
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateArtTagInfoPage.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/content/dependencies/generateArtTagInfoPage.js b/src/content/dependencies/generateArtTagInfoPage.js index 7d034a6a..7dbb22cf 100644 --- a/src/content/dependencies/generateArtTagInfoPage.js +++ b/src/content/dependencies/generateArtTagInfoPage.js @@ -62,6 +62,10 @@ export default { artTag.extraReadingURLs .map(url => relation('linkExternal', url)), + relatedArtTagLinks: + artTag.relatedArtTags + .map(({artTag}) => relation('linkArtTagInfo', artTag)), + directAncestorLinks: artTag.directAncestorArtTags .map(artTag => relation('linkArtTagInfo', artTag)), @@ -95,6 +99,10 @@ export default { numArtworksTotal: query.allThings.length, + + relatedArtTagAnnotations: + artTag.relatedArtTags + .map(({annotation}) => annotation), }), generate: (data, relations, {html, language}) => @@ -148,6 +156,27 @@ export default { ?.slot('content', language.$(pageCapsule, 'viewArtGallery.link')), })), + html.tag('p', + {[html.onlyIfContent]: true}, + + language.encapsulate(pageCapsule, 'seeAlso', capsule => + language.$(capsule, { + [language.onlyIfOptions]: ['tags'], + + tags: + language.formatUnitList( + stitchArrays({ + artTagLink: relations.relatedArtTagLinks, + annotation: data.relatedArtTagAnnotations, + }).map(({artTagLink, annotation}) => + (html.isBlank(annotation) + ? artTagLink + : language.$(capsule, 'tagWithAnnotation', { + tag: artTagLink, + annotation, + })))), + }))), + html.tag('blockquote', {[html.onlyIfContent]: true}, |