diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 18:02:27 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 18:02:27 -0300 |
commit | c75b029160248b6935e5c0f5156cc7a870311e82 (patch) | |
tree | 693c5cca195e50b048b0086e768aa06a7c1986ee /src/page/tag.js | |
parent | f65e712fe8b8b1a196da2db286ebc6a5c9bf7433 (diff) |
real pragma, and some eslint fixes
Diffstat (limited to 'src/page/tag.js')
-rw-r--r-- | src/page/tag.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/page/tag.js b/src/page/tag.js index efd95e1..4b2322d 100644 --- a/src/page/tag.js +++ b/src/page/tag.js @@ -1,34 +1,34 @@ -// @format -// +/** @format */ + // Art tag page specification. // Imports -import fixWS from "fix-whitespace"; +import fixWS from 'fix-whitespace'; // Page exports -export function condition({ wikiData }) { +export function condition({wikiData}) { return wikiData.wikiInfo.enableArtTagUI; } -export function targets({ wikiData }) { +export function targets({wikiData}) { return wikiData.artTagData.filter((tag) => !tag.isContentWarning); } -export function write(tag, { wikiData }) { - const { wikiInfo } = wikiData; - const { taggedInThings: things } = tag; +export function write(tag, {wikiData}) { + const {wikiInfo} = wikiData; + const {taggedInThings: things} = tag; // Display things featuring this art tag in reverse chronological order, // sticking the most recent additions near the top! const thingsReversed = things.slice().reverse(); - const entries = thingsReversed.map((item) => ({ item })); + const entries = thingsReversed.map((item) => ({item})); const page = { - type: "page", - path: ["tag", tag.directory], + type: 'page', + path: ['tag', tag.directory], page: ({ generatePreviousNextLinks, getAlbumCover, @@ -39,14 +39,14 @@ export function write(tag, { wikiData }) { language, to, }) => ({ - title: language.$("tagPage.title", { tag: tag.name }), + title: language.$('tagPage.title', {tag: tag.name}), theme: getThemeString(tag.color), main: { - classes: ["top-index"], + classes: ['top-index'], content: fixWS` - <h1>${language.$("tagPage.title", { tag: tag.name })}</h1> - <p class="quick-info">${language.$("tagPage.infoLine", { + <h1>${language.$('tagPage.title', {tag: tag.name})}</h1> + <p class="quick-info">${language.$('tagPage.infoLine', { coverArts: language.countCoverArts(things.length, { unit: true, }), @@ -83,24 +83,24 @@ export function write(tag, { wikiData }) { function generateTagNav( tag, - { generatePreviousNextLinks, link, language, wikiData } + {generatePreviousNextLinks, link, language, wikiData} ) { const previousNextLinks = generatePreviousNextLinks(tag, { data: wikiData.artTagData.filter((tag) => !tag.isContentWarning), - linkKey: "tag", + linkKey: 'tag', }); return { - linkContainerClasses: ["nav-links-hierarchy"], + linkContainerClasses: ['nav-links-hierarchy'], links: [ - { toHome: true }, + {toHome: true}, wikiData.wikiInfo.enableListings && { - path: ["localized.listingIndex"], - title: language.$("listingIndex.title"), + path: ['localized.listingIndex'], + title: language.$('listingIndex.title'), }, { - html: language.$("tagPage.nav.tag", { - tag: link.tag(tag, { class: "current" }), + html: language.$('tagPage.nav.tag', { + tag: link.tag(tag, {class: 'current'}), }), }, /* |