diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-07-07 02:07:52 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-07-07 02:11:22 -0300 |
commit | 1ad3694bf132604eb7044c5a47771637d2b5d56f (patch) | |
tree | 3a1c08ef8195677c03ec36dbd96813e1d72906f3 /src/page/tag.js | |
parent | 202d6e2a7bccd58823dbdbe6cf4150a4bdad9f74 (diff) |
htmlify: artist, commentary, flash, static, tag
Diffstat (limited to 'src/page/tag.js')
-rw-r--r-- | src/page/tag.js | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/src/page/tag.js b/src/page/tag.js index 38f7e213..faa0df22 100644 --- a/src/page/tag.js +++ b/src/page/tag.js @@ -2,12 +2,6 @@ // Art tag page specification. -// Imports - -import fixWS from 'fix-whitespace'; - -// Page exports - export function condition({wikiData}) { return wikiData.wikiInfo.enableArtTagUI; } @@ -33,6 +27,7 @@ export function write(tag, {wikiData}) { getGridHTML, getThemeString, getTrackCover, + html, link, language, }) => ({ @@ -41,27 +36,34 @@ export function write(tag, {wikiData}) { main: { classes: ['top-index'], - content: fixWS` - <h1>${language.$('tagPage.title', {tag: tag.name})}</h1> - <p class="quick-info">${language.$('tagPage.infoLine', { - coverArts: language.countCoverArts(things.length, { - unit: true, - }), - })}</p> - <div class="grid-listing"> - ${getGridHTML({ - entries, - srcFn: (thing) => - thing.album - ? getTrackCover(thing) - : getAlbumCover(thing), - linkFn: (thing, opts) => - thing.album - ? link.track(thing, opts) - : link.album(thing, opts), - })} - </div> - `, + content: [ + html.tag('h1', + language.$('tagPage.title', { + tag: tag.name, + })), + + html.tag('p', + {class: 'quick-info'}, + language.$('tagPage.infoLine', { + coverArts: language.countCoverArts(things.length, { + unit: true, + }), + })), + + html.tag('div', + {class: 'grid-listing'}, + getGridHTML({ + entries, + srcFn: (thing) => + thing.album + ? getTrackCover(thing) + : getAlbumCover(thing), + linkFn: (thing, opts) => + thing.album + ? link.track(thing, opts) + : link.album(thing, opts), + })), + ], }, nav: generateTagNav(tag, { |