${getAlbumGridHTML({
- entries: (
- row.sourceGroupByRef === 'new-releases' ? getNewReleases(row.countAlbumsFromGroup, {wikiData}) :
- row.sourceGroupByRef === 'new-additions' ? getNewAdditions(row.countAlbumsFromGroup, {wikiData}) :
- ((row.sourceGroup?.albums ?? [])
- .slice()
- .reverse()
- .filter(album => album.isListedOnHomepage)
- .slice(0, row.countAlbumsFromGroup)
- .map(album => ({item: album})))
- ).concat(row.sourceAlbums.map(album => ({item: album}))),
- lazy: i > 0
+ entries: (row.sourceGroupByRef ===
+ "new-releases"
+ ? getNewReleases(
+ row.countAlbumsFromGroup,
+ { wikiData }
+ )
+ : row.sourceGroupByRef ===
+ "new-additions"
+ ? getNewAdditions(
+ row.countAlbumsFromGroup,
+ { wikiData }
+ )
+ : (row.sourceGroup?.albums ?? [])
+ .slice()
+ .reverse()
+ .filter(
+ (album) =>
+ album.isListedOnHomepage
+ )
+ .slice(0, row.countAlbumsFromGroup)
+ .map((album) => ({ item: album }))
+ ).concat(
+ row.sourceAlbums.map((album) => ({
+ item: album,
+ }))
+ ),
+ lazy: i > 0,
})}
- ${row.actionLinks?.length && fixWS`
+ ${
+ row.actionLinks?.length &&
+ fixWS`
- `}
+ `
+ }
- `).join('\n')}
- `
- },
-
- sidebarLeft: homepageLayout.sidebarContent && {
- wide: true,
- collapse: false,
- // This is a pretty filthy hack! 8ut otherwise, the [[news]] part
- // gets treated like it's a reference to the track named "news",
- // which o8viously isn't what we're going for. Gotta catch that
- // 8efore we pass it to transformMultiline, 'cuz otherwise it'll
- // get repl8ced with just the word "news" (or anything else that
- // transformMultiline does with references it can't match) -- and
- // we can't match that for replacing it with the news column!
- //
- // And no, I will not make [[news]] into part of transformMultiline
- // (even though that would 8e hilarious).
- content: (transformMultiline(homepageLayout.sidebarContent.replace('[[news]]', '__GENERATE_NEWS__'))
- .replace('
__GENERATE_NEWS__
', wikiInfo.enableNews ? fixWS`
-
${language.$('homepage.news.title')}
- ${newsData.slice(0, 3).map((entry, i) => html.tag('article',
- {class: ['news-entry', i === 0 && 'first-news-entry']},
- fixWS`
-
${language.formatDate(entry.date)} ${link.newsEntry(entry)}
+ `
+ )
+ .join("\n")}
+ `,
+ },
+
+ sidebarLeft: homepageLayout.sidebarContent && {
+ wide: true,
+ collapse: false,
+ // This is a pretty filthy hack! 8ut otherwise, the [[news]] part
+ // gets treated like it's a reference to the track named "news",
+ // which o8viously isn't what we're going for. Gotta catch that
+ // 8efore we pass it to transformMultiline, 'cuz otherwise it'll
+ // get repl8ced with just the word "news" (or anything else that
+ // transformMultiline does with references it can't match) -- and
+ // we can't match that for replacing it with the news column!
+ //
+ // And no, I will not make [[news]] into part of transformMultiline
+ // (even though that would 8e hilarious).
+ content: transformMultiline(
+ homepageLayout.sidebarContent.replace("[[news]]", "__GENERATE_NEWS__")
+ ).replace(
+ "
__GENERATE_NEWS__
",
+ wikiInfo.enableNews
+ ? fixWS`
+
${language.$("homepage.news.title")}
+ ${newsData
+ .slice(0, 3)
+ .map((entry, i) =>
+ html.tag(
+ "article",
+ {
+ class: [
+ "news-entry",
+ i === 0 && "first-news-entry",
+ ],
+ },
+ fixWS`
+
${language.formatDate(
+ entry.date
+ )} ${link.newsEntry(entry)}
${transformMultiline(entry.contentShort)}
- ${entry.contentShort !== entry.content && link.newsEntry(entry, {
- text: language.$('homepage.news.entry.viewRest')
- })}
- `)).join('\n')}
- ` : `
News requested in content description but this feature isn't enabled
`))
- },
-
- nav: {
- linkContainerClasses: ['nav-links-index'],
- links: [
- link.home('', {text: wikiInfo.nameShort, class: 'current', to}),
-
- wikiInfo.enableListings &&
- link.listingIndex('', {text: language.$('listingIndex.title'), to}),
-
- wikiInfo.enableNews &&
- link.newsIndex('', {text: language.$('newsIndex.title'), to}),
-
- wikiInfo.enableFlashesAndGames &&
- link.flashIndex('', {text: language.$('flashIndex.title'), to}),
-
- ...(staticPageData
- .filter(page => page.showInNavigationBar)
- .map(page => link.staticPage(page, {text: page.nameShort}))),
- ].filter(Boolean).map(html => ({html})),
- }
- })
- };
-
- return [page];
+ ${
+ entry.contentShort !== entry.content &&
+ link.newsEntry(entry, {
+ text: language.$(
+ "homepage.news.entry.viewRest"
+ ),
+ })
+ }
+ `
+ )
+ )
+ .join("\n")}
+ `
+ : `
News requested in content description but this feature isn't enabled
`
+ ),
+ },
+
+ nav: {
+ linkContainerClasses: ["nav-links-index"],
+ links: [
+ link.home("", { text: wikiInfo.nameShort, class: "current", to }),
+
+ wikiInfo.enableListings &&
+ link.listingIndex("", {
+ text: language.$("listingIndex.title"),
+ to,
+ }),
+
+ wikiInfo.enableNews &&
+ link.newsIndex("", { text: language.$("newsIndex.title"), to }),
+
+ wikiInfo.enableFlashesAndGames &&
+ link.flashIndex("", { text: language.$("flashIndex.title"), to }),
+
+ ...staticPageData
+ .filter((page) => page.showInNavigationBar)
+ .map((page) => link.staticPage(page, { text: page.nameShort })),
+ ]
+ .filter(Boolean)
+ .map((html) => ({ html })),
+ },
+ }),
+ };
+
+ return [page];
}
diff --git a/src/page/index.js b/src/page/index.js
index f580cbea..50fbd7a4 100644
--- a/src/page/index.js
+++ b/src/page/index.js
@@ -39,15 +39,15 @@
// These functions should be referenced only from adjacent modules, as they
// pertain only to site page generation.
-export * as album from './album.js';
-export * as albumCommentary from './album-commentary.js';
-export * as artist from './artist.js';
-export * as artistAlias from './artist-alias.js';
-export * as flash from './flash.js';
-export * as group from './group.js';
-export * as homepage from './homepage.js';
-export * as listing from './listing.js';
-export * as news from './news.js';
-export * as static from './static.js';
-export * as tag from './tag.js';
-export * as track from './track.js';
+export * as album from "./album.js";
+export * as albumCommentary from "./album-commentary.js";
+export * as artist from "./artist.js";
+export * as artistAlias from "./artist-alias.js";
+export * as flash from "./flash.js";
+export * as group from "./group.js";
+export * as homepage from "./homepage.js";
+export * as listing from "./listing.js";
+export * as news from "./news.js";
+export * as static from "./static.js";
+export * as tag from "./tag.js";
+export * as track from "./track.js";
diff --git a/src/page/listing.js b/src/page/listing.js
index 447a0c8f..886c8a9d 100644
--- a/src/page/listing.js
+++ b/src/page/listing.js
@@ -10,193 +10,218 @@
// Imports
-import fixWS from 'fix-whitespace';
+import fixWS from "fix-whitespace";
-import * as html from '../util/html.js';
+import * as html from "../util/html.js";
-import {
- getTotalDuration
-} from '../util/wiki-data.js';
+import { getTotalDuration } from "../util/wiki-data.js";
// Page exports
-export function condition({wikiData}) {
- return wikiData.wikiInfo.enableListings;
+export function condition({ wikiData }) {
+ return wikiData.wikiInfo.enableListings;
}
-export function targets({wikiData}) {
- return wikiData.listingSpec;
+export function targets({ wikiData }) {
+ return wikiData.listingSpec;
}
-export function write(listing, {wikiData}) {
- if (listing.condition && !listing.condition({wikiData})) {
- return null;
- }
+export function write(listing, { wikiData }) {
+ if (listing.condition && !listing.condition({ wikiData })) {
+ return null;
+ }
- const { wikiInfo } = wikiData;
+ const { wikiInfo } = wikiData;
- const data = (listing.data
- ? listing.data({wikiData})
- : null);
+ const data = listing.data ? listing.data({ wikiData }) : null;
- const page = {
- type: 'page',
- path: ['listing', listing.directory],
- page: opts => {
- const { getLinkThemeString, link, language } = opts;
- const titleKey = `listingPage.${listing.stringsKey}.title`;
+ const page = {
+ type: "page",
+ path: ["listing", listing.directory],
+ page: (opts) => {
+ const { getLinkThemeString, link, language } = opts;
+ const titleKey = `listingPage.${listing.stringsKey}.title`;
- return {
- title: language.$(titleKey),
+ return {
+ title: language.$(titleKey),
- main: {
- content: fixWS`
+ main: {
+ content: fixWS`
${language.$(titleKey)}
- ${listing.html && (listing.data
+ ${
+ listing.html &&
+ (listing.data
? listing.html(data, opts)
- : listing.html(opts))}
- ${listing.row && fixWS`
+ : listing.html(opts))
+ }
+ ${
+ listing.row &&
+ fixWS`
- ${(data
- .map(item => listing.row(item, opts))
- .map(row => `${row} `)
- .join('\n'))}
+ ${data
+ .map((item) => listing.row(item, opts))
+ .map((row) => `${row} `)
+ .join("\n")}
- `}
- `
- },
-
- sidebarLeft: {
- content: generateSidebarForListings(listing, {
- getLinkThemeString,
- link,
- language,
- wikiData
- })
- },
-
- nav: {
- linkContainerClasses: ['nav-links-hierarchy'],
- links: [
- {toHome: true},
- {
- path: ['localized.listingIndex'],
- title: language.$('listingIndex.title')
- },
- {toCurrentPage: true}
- ]
- }
- };
- }
- };
-
- return [page];
-}
-
-export function writeTargetless({wikiData}) {
- const { albumData, trackData, wikiInfo } = wikiData;
+ `
+ }
+ `,
+ },
- const totalDuration = getTotalDuration(trackData);
-
- const page = {
- type: 'page',
- path: ['listingIndex'],
- page: ({
+ sidebarLeft: {
+ content: generateSidebarForListings(listing, {
getLinkThemeString,
+ link,
language,
- link
- }) => ({
- title: language.$('listingIndex.title'),
-
- main: {
- content: fixWS`
-
${language.$('listingIndex.title')}
-
${language.$('listingIndex.infoLine', {
- wiki: wikiInfo.name,
- tracks: `${language.countTracks(trackData.length, {unit: true})} `,
- albums: `${language.countAlbums(albumData.length, {unit: true})} `,
- duration: `${language.formatDuration(totalDuration, {approximate: true, unit: true})} `
- })}
-
-
${language.$('listingIndex.exploreList')}
- ${generateLinkIndexForListings(null, false, {link, language, wikiData})}
- `
- },
-
- sidebarLeft: {
- content: generateSidebarForListings(null, {
- getLinkThemeString,
- link,
- language,
- wikiData
- })
+ wikiData,
+ }),
+ },
+
+ nav: {
+ linkContainerClasses: ["nav-links-hierarchy"],
+ links: [
+ { toHome: true },
+ {
+ path: ["localized.listingIndex"],
+ title: language.$("listingIndex.title"),
},
+ { toCurrentPage: true },
+ ],
+ },
+ };
+ },
+ };
+
+ return [page];
+}
- nav: {simple: true}
- })
- };
-
- return [page];
-};
+export function writeTargetless({ wikiData }) {
+ const { albumData, trackData, wikiInfo } = wikiData;
+
+ const totalDuration = getTotalDuration(trackData);
+
+ const page = {
+ type: "page",
+ path: ["listingIndex"],
+ page: ({ getLinkThemeString, language, link }) => ({
+ title: language.$("listingIndex.title"),
+
+ main: {
+ content: fixWS`
+
${language.$("listingIndex.title")}
+
${language.$("listingIndex.infoLine", {
+ wiki: wikiInfo.name,
+ tracks: `${language.countTracks(trackData.length, {
+ unit: true,
+ })} `,
+ albums: `${language.countAlbums(albumData.length, {
+ unit: true,
+ })} `,
+ duration: `${language.formatDuration(totalDuration, {
+ approximate: true,
+ unit: true,
+ })} `,
+ })}
+
+
${language.$("listingIndex.exploreList")}
+ ${generateLinkIndexForListings(null, false, {
+ link,
+ language,
+ wikiData,
+ })}
+ `,
+ },
+
+ sidebarLeft: {
+ content: generateSidebarForListings(null, {
+ getLinkThemeString,
+ link,
+ language,
+ wikiData,
+ }),
+ },
+
+ nav: { simple: true },
+ }),
+ };
+
+ return [page];
+}
// Utility functions
-function generateSidebarForListings(currentListing, {
- getLinkThemeString,
- link,
- language,
- wikiData
-}) {
- return fixWS`
-
${link.listingIndex('', {text: language.$('listingIndex.title')})}
+function generateSidebarForListings(
+ currentListing,
+ { getLinkThemeString, link, language, wikiData }
+) {
+ return fixWS`
+
${link.listingIndex("", {
+ text: language.$("listingIndex.title"),
+ })}
${generateLinkIndexForListings(currentListing, true, {
- getLinkThemeString,
- link,
- language,
- wikiData
+ getLinkThemeString,
+ link,
+ language,
+ wikiData,
})}
`;
}
-function generateLinkIndexForListings(currentListing, forSidebar, {
- getLinkThemeString,
- link,
- language,
- wikiData
-}) {
- const { listingTargetSpec, wikiInfo } = wikiData;
-
- const filteredByCondition = listingTargetSpec
- .map(({ listings, ...rest }) => ({
- ...rest,
- listings: listings.filter(({ condition: c }) => !c || c({wikiData}))
- }))
- .filter(({ listings }) => listings.length > 0);
-
- const genUL = listings => html.tag('ul',
- listings.map(listing => html.tag('li',
- {class: [listing === currentListing && 'current']},
- link.listing(listing, {text: language.$(`listingPage.${listing.stringsKey}.title.short`)})
- )));
-
- if (forSidebar) {
- return filteredByCondition.map(({ title, listings }) =>
- html.tag('details', {
- open: !forSidebar || listings.includes(currentListing),
- class: listings.includes(currentListing) && 'current'
- }, [
- html.tag('summary',
- {style: getLinkThemeString(wikiInfo.color)},
- html.tag('span',
- {class: 'group-name'},
- title({language}))),
- genUL(listings)
- ])).join('\n');
- } else {
- return html.tag('dl',
- filteredByCondition.flatMap(({ title, listings }) => [
- html.tag('dt', title({language})),
- html.tag('dd', genUL(listings))
- ]));
- }
+function generateLinkIndexForListings(
+ currentListing,
+ forSidebar,
+ { getLinkThemeString, link, language, wikiData }
+) {
+ const { listingTargetSpec, wikiInfo } = wikiData;
+
+ const filteredByCondition = listingTargetSpec
+ .map(({ listings, ...rest }) => ({
+ ...rest,
+ listings: listings.filter(({ condition: c }) => !c || c({ wikiData })),
+ }))
+ .filter(({ listings }) => listings.length > 0);
+
+ const genUL = (listings) =>
+ html.tag(
+ "ul",
+ listings.map((listing) =>
+ html.tag(
+ "li",
+ { class: [listing === currentListing && "current"] },
+ link.listing(listing, {
+ text: language.$(`listingPage.${listing.stringsKey}.title.short`),
+ })
+ )
+ )
+ );
+
+ if (forSidebar) {
+ return filteredByCondition
+ .map(({ title, listings }) =>
+ html.tag(
+ "details",
+ {
+ open: !forSidebar || listings.includes(currentListing),
+ class: listings.includes(currentListing) && "current",
+ },
+ [
+ html.tag(
+ "summary",
+ { style: getLinkThemeString(wikiInfo.color) },
+ html.tag("span", { class: "group-name" }, title({ language }))
+ ),
+ genUL(listings),
+ ]
+ )
+ )
+ .join("\n");
+ } else {
+ return html.tag(
+ "dl",
+ filteredByCondition.flatMap(({ title, listings }) => [
+ html.tag("dt", title({ language })),
+ html.tag("dd", genUL(listings)),
+ ])
+ );
+ }
}
diff --git a/src/page/news.js b/src/page/news.js
index 9336506f..2fc5d7b0 100644
--- a/src/page/news.js
+++ b/src/page/news.js
@@ -2,126 +2,135 @@
// Imports
-import fixWS from 'fix-whitespace';
+import fixWS from "fix-whitespace";
// Page exports
-export function condition({wikiData}) {
- return wikiData.wikiInfo.enableNews;
+export function condition({ wikiData }) {
+ return wikiData.wikiInfo.enableNews;
}
-export function targets({wikiData}) {
- return wikiData.newsData;
+export function targets({ wikiData }) {
+ return wikiData.newsData;
}
-export function write(entry, {wikiData}) {
- const page = {
- type: 'page',
- path: ['newsEntry', entry.directory],
- page: ({
- generatePreviousNextLinks,
- link,
- language,
- transformMultiline,
- }) => ({
- title: language.$('newsEntryPage.title', {entry: entry.name}),
-
- main: {
- content: fixWS`
+export function write(entry, { wikiData }) {
+ const page = {
+ type: "page",
+ path: ["newsEntry", entry.directory],
+ page: ({
+ generatePreviousNextLinks,
+ link,
+ language,
+ transformMultiline,
+ }) => ({
+ title: language.$("newsEntryPage.title", { entry: entry.name }),
+
+ main: {
+ content: fixWS`
-
${language.$('newsEntryPage.title', {entry: entry.name})}
-
${language.$('newsEntryPage.published', {date: language.formatDate(entry.date)})}
+
${language.$("newsEntryPage.title", {
+ entry: entry.name,
+ })}
+
${language.$("newsEntryPage.published", {
+ date: language.formatDate(entry.date),
+ })}
${transformMultiline(entry.content)}
- `
- },
-
- nav: generateNewsEntryNav(entry, {
- generatePreviousNextLinks,
- link,
- language,
- wikiData
- })
- })
- };
-
- return [page];
+ `,
+ },
+
+ nav: generateNewsEntryNav(entry, {
+ generatePreviousNextLinks,
+ link,
+ language,
+ wikiData,
+ }),
+ }),
+ };
+
+ return [page];
}
-export function writeTargetless({wikiData}) {
- const { newsData } = wikiData;
-
- const page = {
- type: 'page',
- path: ['newsIndex'],
- page: ({
- link,
- language,
- transformMultiline
- }) => ({
- title: language.$('newsIndex.title'),
-
- main: {
- content: fixWS`
+export function writeTargetless({ wikiData }) {
+ const { newsData } = wikiData;
+
+ const page = {
+ type: "page",
+ path: ["newsIndex"],
+ page: ({ link, language, transformMultiline }) => ({
+ title: language.$("newsIndex.title"),
+
+ main: {
+ content: fixWS`
-
${language.$('newsIndex.title')}
- ${newsData.map(entry => fixWS`
+
${language.$("newsIndex.title")}
+ ${newsData
+ .map(
+ (entry) => fixWS`
- ${language.formatDate(entry.date)} ${link.newsEntry(entry)}
+ ${language.formatDate(
+ entry.date
+ )} ${link.newsEntry(entry)}
${transformMultiline(entry.contentShort)}
- ${entry.contentShort !== entry.content && `${link.newsEntry(entry, {
- text: language.$('newsIndex.entry.viewRest')
- })}
`}
+ ${
+ entry.contentShort !== entry.content &&
+ `${link.newsEntry(entry, {
+ text: language.$(
+ "newsIndex.entry.viewRest"
+ ),
+ })}
`
+ }
- `).join('\n')}
+ `
+ )
+ .join("\n")}
- `
- },
+ `,
+ },
- nav: {simple: true}
- })
- };
+ nav: { simple: true },
+ }),
+ };
- return [page];
+ return [page];
}
// Utility functions
-function generateNewsEntryNav(entry, {
- generatePreviousNextLinks,
+function generateNewsEntryNav(
+ entry,
+ { generatePreviousNextLinks, link, language, wikiData }
+) {
+ const { wikiInfo, newsData } = wikiData;
+
+ // The newsData list is sorted reverse chronologically (newest ones first),
+ // so the way we find next/previous entries is flipped from normal.
+ const previousNextLinks = generatePreviousNextLinks(entry, {
link,
language,
- wikiData
-}) {
- const { wikiInfo, newsData } = wikiData;
-
- // The newsData list is sorted reverse chronologically (newest ones first),
- // so the way we find next/previous entries is flipped from normal.
- const previousNextLinks = generatePreviousNextLinks(entry, {
- link, language,
- data: newsData.slice().reverse(),
- linkKey: 'newsEntry'
- });
-
- return {
- linkContainerClasses: ['nav-links-hierarchy'],
- links: [
- {toHome: true},
- {
- path: ['localized.newsIndex'],
- title: language.$('newsEntryPage.nav.news')
- },
- {
- html: language.$('newsEntryPage.nav.entry', {
- date: language.formatDate(entry.date),
- entry: link.newsEntry(entry, {class: 'current'})
- })
- },
- previousNextLinks &&
- {
- divider: false,
- html: `(${previousNextLinks})`
- }
- ]
- };
+ data: newsData.slice().reverse(),
+ linkKey: "newsEntry",
+ });
+
+ return {
+ linkContainerClasses: ["nav-links-hierarchy"],
+ links: [
+ { toHome: true },
+ {
+ path: ["localized.newsIndex"],
+ title: language.$("newsEntryPage.nav.news"),
+ },
+ {
+ html: language.$("newsEntryPage.nav.entry", {
+ date: language.formatDate(entry.date),
+ entry: link.newsEntry(entry, { class: "current" }),
+ }),
+ },
+ previousNextLinks && {
+ divider: false,
+ html: `(${previousNextLinks})`,
+ },
+ ],
+ };
}
diff --git a/src/page/static.js b/src/page/static.js
index e9b6a047..39acd64e 100644
--- a/src/page/static.js
+++ b/src/page/static.js
@@ -4,37 +4,34 @@
// Imports
-import fixWS from 'fix-whitespace';
+import fixWS from "fix-whitespace";
// Page exports
-export function targets({wikiData}) {
- return wikiData.staticPageData;
+export function targets({ wikiData }) {
+ return wikiData.staticPageData;
}
-export function write(staticPage, {wikiData}) {
- const page = {
- type: 'page',
- path: ['staticPage', staticPage.directory],
- page: ({
- language,
- transformMultiline
- }) => ({
- title: staticPage.name,
- stylesheet: staticPage.stylesheet,
-
- main: {
- content: fixWS`
+export function write(staticPage, { wikiData }) {
+ const page = {
+ type: "page",
+ path: ["staticPage", staticPage.directory],
+ page: ({ language, transformMultiline }) => ({
+ title: staticPage.name,
+ stylesheet: staticPage.stylesheet,
+
+ main: {
+ content: fixWS`
${staticPage.name}
${transformMultiline(staticPage.content)}
- `
- },
+ `,
+ },
- nav: {simple: true}
- })
- };
+ nav: { simple: true },
+ }),
+ };
- return [page];
+ return [page];
}
diff --git a/src/page/tag.js b/src/page/tag.js
index 471439da..98b552b3 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -2,110 +2,111 @@
// Imports
-import fixWS from 'fix-whitespace';
+import fixWS from "fix-whitespace";
// Page exports
-export function condition({wikiData}) {
- return wikiData.wikiInfo.enableArtTagUI;
+export function condition({ wikiData }) {
+ return wikiData.wikiInfo.enableArtTagUI;
}
-export function targets({wikiData}) {
- return wikiData.artTagData.filter(tag => !tag.isContentWarning);
+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();
+ // 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],
- page: ({
- generatePreviousNextLinks,
- getAlbumCover,
- getGridHTML,
- getThemeString,
- getTrackCover,
- link,
- language,
- to
- }) => ({
- title: language.$('tagPage.title', {tag: tag.name}),
- theme: getThemeString(tag.color),
+ const page = {
+ type: "page",
+ path: ["tag", tag.directory],
+ page: ({
+ generatePreviousNextLinks,
+ getAlbumCover,
+ getGridHTML,
+ getThemeString,
+ getTrackCover,
+ link,
+ language,
+ to,
+ }) => ({
+ title: language.$("tagPage.title", { tag: tag.name }),
+ theme: getThemeString(tag.color),
- main: {
- classes: ['top-index'],
- content: fixWS`
-
${language.$('tagPage.title', {tag: tag.name})}
-
${language.$('tagPage.infoLine', {
- coverArts: language.countCoverArts(things.length, {unit: true})
+ main: {
+ classes: ["top-index"],
+ content: fixWS`
+
${language.$("tagPage.title", { tag: tag.name })}
+
${language.$("tagPage.infoLine", {
+ coverArts: language.countCoverArts(things.length, {
+ unit: true,
+ }),
})}
${getGridHTML({
- entries,
- srcFn: thing => (thing.album
- ? getTrackCover(thing)
- : getAlbumCover(thing)),
- linkFn: (thing, opts) => (thing.album
- ? link.track(thing, opts)
- : link.album(thing, opts))
+ 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, {
- generatePreviousNextLinks,
- link,
- language,
- wikiData
- })
- })
- };
+ nav: generateTagNav(tag, {
+ generatePreviousNextLinks,
+ link,
+ language,
+ wikiData,
+ }),
+ }),
+ };
- return [page];
+ return [page];
}
// Utility functions
-function generateTagNav(tag, {
- generatePreviousNextLinks,
- link,
- language,
- wikiData
-}) {
- const previousNextLinks = generatePreviousNextLinks(tag, {
- data: wikiData.artTagData.filter(tag => !tag.isContentWarning),
- linkKey: 'tag'
- });
+function generateTagNav(
+ tag,
+ { generatePreviousNextLinks, link, language, wikiData }
+) {
+ const previousNextLinks = generatePreviousNextLinks(tag, {
+ data: wikiData.artTagData.filter((tag) => !tag.isContentWarning),
+ linkKey: "tag",
+ });
- return {
- linkContainerClasses: ['nav-links-hierarchy'],
- links: [
- {toHome: true},
- wikiData.wikiInfo.enableListings &&
- {
- path: ['localized.listingIndex'],
- title: language.$('listingIndex.title')
- },
- {
- html: language.$('tagPage.nav.tag', {
- tag: link.tag(tag, {class: 'current'})
- })
- },
- /*
+ return {
+ linkContainerClasses: ["nav-links-hierarchy"],
+ links: [
+ { toHome: true },
+ wikiData.wikiInfo.enableListings && {
+ path: ["localized.listingIndex"],
+ title: language.$("listingIndex.title"),
+ },
+ {
+ html: language.$("tagPage.nav.tag", {
+ tag: link.tag(tag, { class: "current" }),
+ }),
+ },
+ /*
previousNextLinks && {
divider: false,
html: `(${previousNextLinks})`
}
*/
- ]
- };
+ ],
+ };
}
diff --git a/src/page/track.js b/src/page/track.js
index c4ec6c59..15316e8f 100644
--- a/src/page/track.js
+++ b/src/page/track.js
@@ -2,186 +2,221 @@
// Imports
-import fixWS from 'fix-whitespace';
+import fixWS from "fix-whitespace";
import {
- generateAlbumChronologyLinks,
- generateAlbumNavLinks,
- generateAlbumSecondaryNav,
- generateAlbumSidebar
-} from './album.js';
+ generateAlbumChronologyLinks,
+ generateAlbumNavLinks,
+ generateAlbumSecondaryNav,
+ generateAlbumSidebar,
+} from "./album.js";
-import * as html from '../util/html.js';
+import * as html from "../util/html.js";
-import {
- bindOpts
-} from '../util/sugar.js';
+import { bindOpts } from "../util/sugar.js";
import {
- getTrackCover,
- getAlbumListTag,
- sortChronologically,
-} from '../util/wiki-data.js';
+ getTrackCover,
+ getAlbumListTag,
+ sortChronologically,
+} from "../util/wiki-data.js";
// Page exports
-export function targets({wikiData}) {
- return wikiData.trackData;
+export function targets({ wikiData }) {
+ return wikiData.trackData;
}
-export function write(track, {wikiData}) {
- const { groupData, wikiInfo } = wikiData;
- const { album, referencedByTracks, referencedTracks, otherReleases } = track;
+export function write(track, { wikiData }) {
+ const { groupData, wikiInfo } = wikiData;
+ const { album, referencedByTracks, referencedTracks, otherReleases } = track;
- const listTag = getAlbumListTag(album);
+ const listTag = getAlbumListTag(album);
- let flashesThatFeature;
- if (wikiInfo.enableFlashesAndGames) {
- flashesThatFeature = sortChronologically([track, ...otherReleases]
- .flatMap(track => track.featuredInFlashes
- .map(flash => ({
- flash,
- as: track,
- directory: flash.directory,
- name: flash.name,
- date: flash.date
- }))));
- }
+ let flashesThatFeature;
+ if (wikiInfo.enableFlashesAndGames) {
+ flashesThatFeature = sortChronologically(
+ [track, ...otherReleases].flatMap((track) =>
+ track.featuredInFlashes.map((flash) => ({
+ flash,
+ as: track,
+ directory: flash.directory,
+ name: flash.name,
+ date: flash.date,
+ }))
+ )
+ );
+ }
- const unbound_getTrackItem = (track, {getArtistString, link, language}) => (
- html.tag('li', language.$('trackList.item.withArtists', {
- track: link.track(track),
- by: `
${language.$('trackList.item.withArtists.by', {
- artists: getArtistString(track.artistContribs)
- })} `
- })));
+ const unbound_getTrackItem = (track, { getArtistString, link, language }) =>
+ html.tag(
+ "li",
+ language.$("trackList.item.withArtists", {
+ track: link.track(track),
+ by: `
${language.$("trackList.item.withArtists.by", {
+ artists: getArtistString(track.artistContribs),
+ })} `,
+ })
+ );
- const unbound_generateTrackList = (tracks, {getArtistString, link, language}) => html.tag('ul',
- tracks.map(track => unbound_getTrackItem(track, {getArtistString, link, language}))
+ const unbound_generateTrackList = (
+ tracks,
+ { getArtistString, link, language }
+ ) =>
+ html.tag(
+ "ul",
+ tracks.map((track) =>
+ unbound_getTrackItem(track, { getArtistString, link, language })
+ )
);
- const hasCommentary = track.commentary || otherReleases.some(t => t.commentary);
- const generateCommentary = ({
- link,
- language,
- transformMultiline
- }) => transformMultiline([
+ const hasCommentary =
+ track.commentary || otherReleases.some((t) => t.commentary);
+ const generateCommentary = ({ link, language, transformMultiline }) =>
+ transformMultiline(
+ [
track.commentary,
- ...otherReleases.map(track =>
- (track.commentary?.split('\n')
- .filter(line => line.replace(/<\/b>/g, '').includes(':'))
- .map(line => fixWS`
+ ...otherReleases.map((track) =>
+ track.commentary
+ ?.split("\n")
+ .filter((line) => line.replace(/<\/b>/g, "").includes(":"))
+ .map(
+ (line) => fixWS`
${line}
- ${language.$('releaseInfo.artistCommentary.seeOriginalRelease', {
- original: link.track(track)
- })}
- `)
- .join('\n')))
- ].filter(Boolean).join('\n'));
+ ${language.$(
+ "releaseInfo.artistCommentary.seeOriginalRelease",
+ {
+ original: link.track(track),
+ }
+ )}
+ `
+ )
+ .join("\n")
+ ),
+ ]
+ .filter(Boolean)
+ .join("\n")
+ );
- const data = {
- type: 'data',
- path: ['track', track.directory],
- data: ({
- serializeContribs,
- serializeCover,
- serializeGroupsForTrack,
- serializeLink
- }) => ({
- name: track.name,
- directory: track.directory,
- dates: {
- released: track.date,
- originallyReleased: track.originalDate,
- coverArtAdded: track.coverArtDate
- },
- duration: track.duration,
- color: track.color,
- cover: serializeCover(track, getTrackCover),
- artistsContribs: serializeContribs(track.artistContribs),
- contributorContribs: serializeContribs(track.contributorContribs),
- coverArtistContribs: serializeContribs(track.coverArtistContribs || []),
- album: serializeLink(track.album),
- groups: serializeGroupsForTrack(track),
- references: track.references.map(serializeLink),
- referencedBy: track.referencedBy.map(serializeLink),
- alsoReleasedAs: otherReleases.map(track => ({
- track: serializeLink(track),
- album: serializeLink(track.album)
- }))
- })
- };
+ const data = {
+ type: "data",
+ path: ["track", track.directory],
+ data: ({
+ serializeContribs,
+ serializeCover,
+ serializeGroupsForTrack,
+ serializeLink,
+ }) => ({
+ name: track.name,
+ directory: track.directory,
+ dates: {
+ released: track.date,
+ originallyReleased: track.originalDate,
+ coverArtAdded: track.coverArtDate,
+ },
+ duration: track.duration,
+ color: track.color,
+ cover: serializeCover(track, getTrackCover),
+ artistsContribs: serializeContribs(track.artistContribs),
+ contributorContribs: serializeContribs(track.contributorContribs),
+ coverArtistContribs: serializeContribs(track.coverArtistContribs || []),
+ album: serializeLink(track.album),
+ groups: serializeGroupsForTrack(track),
+ references: track.references.map(serializeLink),
+ referencedBy: track.referencedBy.map(serializeLink),
+ alsoReleasedAs: otherReleases.map((track) => ({
+ track: serializeLink(track),
+ album: serializeLink(track.album),
+ })),
+ }),
+ };
- const getSocialEmbedDescription = ({
- getArtistString: _getArtistString,
- language,
- }) => {
- const hasArtists = (track.artistContribs?.length > 0);
- const hasCoverArtists = (track.coverArtistContribs?.length > 0);
- const getArtistString = contribs => _getArtistString(contribs, {
- // We don't want to put actual HTML tags in social embeds (sadly
- // they don't get parsed and displayed, generally speaking), so
- // override the link argument so that artist "links" just show
- // their names.
- link: {artist: artist => artist.name}
- });
- if (!hasArtists && !hasCoverArtists) return '';
- return language.formatString(
- 'trackPage.socialEmbed.body' + [
- hasArtists && '.withArtists',
- hasCoverArtists && '.withCoverArtists',
- ].filter(Boolean).join(''),
- Object.fromEntries([
- hasArtists && ['artists', getArtistString(track.artistContribs)],
- hasCoverArtists && ['coverArtists', getArtistString(track.coverArtistContribs)],
- ].filter(Boolean)))
- };
+ const getSocialEmbedDescription = ({
+ getArtistString: _getArtistString,
+ language,
+ }) => {
+ const hasArtists = track.artistContribs?.length > 0;
+ const hasCoverArtists = track.coverArtistContribs?.length > 0;
+ const getArtistString = (contribs) =>
+ _getArtistString(contribs, {
+ // We don't want to put actual HTML tags in social embeds (sadly
+ // they don't get parsed and displayed, generally speaking), so
+ // override the link argument so that artist "links" just show
+ // their names.
+ link: { artist: (artist) => artist.name },
+ });
+ if (!hasArtists && !hasCoverArtists) return "";
+ return language.formatString(
+ "trackPage.socialEmbed.body" +
+ [hasArtists && ".withArtists", hasCoverArtists && ".withCoverArtists"]
+ .filter(Boolean)
+ .join(""),
+ Object.fromEntries(
+ [
+ hasArtists && ["artists", getArtistString(track.artistContribs)],
+ hasCoverArtists && [
+ "coverArtists",
+ getArtistString(track.coverArtistContribs),
+ ],
+ ].filter(Boolean)
+ )
+ );
+ };
- const page = {
- type: 'page',
- path: ['track', track.directory],
- page: ({
- absoluteTo,
- fancifyURL,
- generateChronologyLinks,
- generateCoverLink,
- generatePreviousNextLinks,
- generateTrackListDividedByGroups,
- getAlbumStylesheet,
- getArtistString,
- getLinkThemeString,
- getThemeString,
- getTrackCover,
- link,
- language,
- transformInline,
- transformLyrics,
- transformMultiline,
- to,
- urls,
- }) => {
- const getTrackItem = bindOpts(unbound_getTrackItem, {getArtistString, link, language});
- const cover = getTrackCover(track);
+ const page = {
+ type: "page",
+ path: ["track", track.directory],
+ page: ({
+ absoluteTo,
+ fancifyURL,
+ generateChronologyLinks,
+ generateCoverLink,
+ generatePreviousNextLinks,
+ generateTrackListDividedByGroups,
+ getAlbumStylesheet,
+ getArtistString,
+ getLinkThemeString,
+ getThemeString,
+ getTrackCover,
+ link,
+ language,
+ transformInline,
+ transformLyrics,
+ transformMultiline,
+ to,
+ urls,
+ }) => {
+ const getTrackItem = bindOpts(unbound_getTrackItem, {
+ getArtistString,
+ link,
+ language,
+ });
+ const cover = getTrackCover(track);
- return {
- title: language.$('trackPage.title', {track: track.name}),
- stylesheet: getAlbumStylesheet(album, {to}),
- theme: getThemeString(track.color, [
- `--album-directory: ${album.directory}`,
- `--track-directory: ${track.directory}`
- ]),
+ return {
+ title: language.$("trackPage.title", { track: track.name }),
+ stylesheet: getAlbumStylesheet(album, { to }),
+ theme: getThemeString(track.color, [
+ `--album-directory: ${album.directory}`,
+ `--track-directory: ${track.directory}`,
+ ]),
- socialEmbed: {
- heading: language.$('trackPage.socialEmbed.heading', {album: track.album.name}),
- headingLink: absoluteTo('localized.album', album.directory),
- title: language.$('trackPage.socialEmbed.title', {track: track.name}),
- description: getSocialEmbedDescription({getArtistString, language}),
- image: '/' + getTrackCover(track, {to: urls.from('shared.root').to}),
- color: track.color,
- },
+ socialEmbed: {
+ heading: language.$("trackPage.socialEmbed.heading", {
+ album: track.album.name,
+ }),
+ headingLink: absoluteTo("localized.album", album.directory),
+ title: language.$("trackPage.socialEmbed.title", {
+ track: track.name,
+ }),
+ description: getSocialEmbedDescription({ getArtistString, language }),
+ image:
+ "/" + getTrackCover(track, { to: urls.from("shared.root").to }),
+ color: track.color,
+ },
- // disabled for now! shifting banner position per height of page is disorienting
- /*
+ // disabled for now! shifting banner position per height of page is disorienting
+ /*
banner: album.bannerArtistContribs.length && {
classes: ['dim'],
dimensions: album.bannerDimensions,
@@ -191,156 +226,239 @@ export function write(track, {wikiData}) {
},
*/
- main: {
- content: fixWS`
- ${cover && generateCoverLink({
+ main: {
+ content: fixWS`
+ ${
+ cover &&
+ generateCoverLink({
src: cover,
- alt: language.$('misc.alt.trackCover'),
- tags: track.artTags
- })}
-
${language.$('trackPage.title', {track: track.name})}
+ alt: language.$("misc.alt.trackCover"),
+ tags: track.artTags,
+ })
+ }
+
${language.$("trackPage.title", {
+ track: track.name,
+ })}
${[
- language.$('releaseInfo.by', {
- artists: getArtistString(track.artistContribs, {
- showContrib: true,
- showIcons: true
- })
+ language.$("releaseInfo.by", {
+ artists: getArtistString(track.artistContribs, {
+ showContrib: true,
+ showIcons: true,
}),
- track.coverArtistContribs.length && language.$('releaseInfo.coverArtBy', {
- artists: getArtistString(track.coverArtistContribs, {
- showContrib: true,
- showIcons: true
- })
+ }),
+ track.coverArtistContribs.length &&
+ language.$("releaseInfo.coverArtBy", {
+ artists: getArtistString(
+ track.coverArtistContribs,
+ {
+ showContrib: true,
+ showIcons: true,
+ }
+ ),
+ }),
+ track.date &&
+ language.$("releaseInfo.released", {
+ date: language.formatDate(track.date),
}),
- track.date && language.$('releaseInfo.released', {
- date: language.formatDate(track.date)
+ track.coverArtDate &&
+ +track.coverArtDate !== +track.date &&
+ language.$("releaseInfo.artReleased", {
+ date: language.formatDate(track.coverArtDate),
}),
- (track.coverArtDate &&
- +track.coverArtDate !== +track.date &&
- language.$('releaseInfo.artReleased', {
- date: language.formatDate(track.coverArtDate)
- })),
- track.duration && language.$('releaseInfo.duration', {
- duration: language.formatDuration(track.duration)
- })
- ].filter(Boolean).join(' \n')}
+ track.duration &&
+ language.$("releaseInfo.duration", {
+ duration: language.formatDuration(
+ track.duration
+ ),
+ }),
+ ]
+ .filter(Boolean)
+ .join(" \n")}
${
- (track.urls?.length
- ? language.$('releaseInfo.listenOn', {
- links: language.formatDisjunctionList(track.urls.map(url => fancifyURL(url, {language})))
- })
- : language.$('releaseInfo.listenOn.noLinks'))
+ track.urls?.length
+ ? language.$("releaseInfo.listenOn", {
+ links: language.formatDisjunctionList(
+ track.urls.map((url) =>
+ fancifyURL(url, { language })
+ )
+ ),
+ })
+ : language.$("releaseInfo.listenOn.noLinks")
}
- ${otherReleases.length && fixWS`
-
${language.$('releaseInfo.alsoReleasedAs')}
+ ${
+ otherReleases.length &&
+ fixWS`
+
${language.$("releaseInfo.alsoReleasedAs")}
- ${otherReleases.map(track => fixWS`
- ${language.$('releaseInfo.alsoReleasedAs.item', {
+ ${otherReleases
+ .map(
+ (track) => fixWS`
+ ${language.$(
+ "releaseInfo.alsoReleasedAs.item",
+ {
track: link.track(track),
- album: link.album(track.album)
- })}
- `).join('\n')}
+ album: link.album(track.album),
+ }
+ )}
+ `
+ )
+ .join("\n")}
- `}
- ${track.contributorContribs.length && fixWS`
-
${language.$('releaseInfo.contributors')}
+ `
+ }
+ ${
+ track.contributorContribs.length &&
+ fixWS`
+
${language.$("releaseInfo.contributors")}
- ${(track.contributorContribs
- .map(contrib => `${getArtistString([contrib], {
+ ${track.contributorContribs
+ .map(
+ (contrib) =>
+ ` ${getArtistString([contrib], {
showContrib: true,
- showIcons: true
- })} `)
- .join('\n'))}
+ showIcons: true,
+ })}`
+ )
+ .join("\n")}
- `}
- ${referencedTracks.length && fixWS`
-
${language.$('releaseInfo.tracksReferenced', {track: `${track.name} `})}
- ${html.tag('ul', referencedTracks.map(getTrackItem))}
- `}
- ${referencedByTracks.length && fixWS`
-
${language.$('releaseInfo.tracksThatReference', {track: `${track.name} `})}
- ${generateTrackListDividedByGroups(referencedByTracks, {
+ `
+ }
+ ${
+ referencedTracks.length &&
+ fixWS`
+
${language.$("releaseInfo.tracksReferenced", {
+ track: `${track.name} `,
+ })}
+ ${html.tag(
+ "ul",
+ referencedTracks.map(getTrackItem)
+ )}
+ `
+ }
+ ${
+ referencedByTracks.length &&
+ fixWS`
+
${language.$("releaseInfo.tracksThatReference", {
+ track: `${track.name} `,
+ })}
+ ${generateTrackListDividedByGroups(
+ referencedByTracks,
+ {
getTrackItem,
wikiData,
- })}
- `}
- ${wikiInfo.enableFlashesAndGames && flashesThatFeature.length && fixWS`
-
${language.$('releaseInfo.flashesThatFeature', {track: `${track.name} `})}
+ }
+ )}
+ `
+ }
+ ${
+ wikiInfo.enableFlashesAndGames &&
+ flashesThatFeature.length &&
+ fixWS`
+
${language.$("releaseInfo.flashesThatFeature", {
+ track: `${track.name} `,
+ })}
- ${flashesThatFeature.map(({ flash, as }) => html.tag('li',
- {class: as !== track && 'rerelease'},
- (as === track
- ? language.$('releaseInfo.flashesThatFeature.item', {
- flash: link.flash(flash)
- })
- : language.$('releaseInfo.flashesThatFeature.item.asDifferentRelease', {
- flash: link.flash(flash),
- track: link.track(as)
- })))).join('\n')}
+ ${flashesThatFeature
+ .map(({ flash, as }) =>
+ html.tag(
+ "li",
+ { class: as !== track && "rerelease" },
+ as === track
+ ? language.$(
+ "releaseInfo.flashesThatFeature.item",
+ {
+ flash: link.flash(flash),
+ }
+ )
+ : language.$(
+ "releaseInfo.flashesThatFeature.item.asDifferentRelease",
+ {
+ flash: link.flash(flash),
+ track: link.track(as),
+ }
+ )
+ )
+ )
+ .join("\n")}
- `}
- ${track.lyrics && fixWS`
-
${language.$('releaseInfo.lyrics')}
+ `
+ }
+ ${
+ track.lyrics &&
+ fixWS`
+
${language.$("releaseInfo.lyrics")}
${transformLyrics(track.lyrics)}
- `}
- ${hasCommentary && fixWS`
-
${language.$('releaseInfo.artistCommentary')}
+ `
+ }
+ ${
+ hasCommentary &&
+ fixWS`
+
${language.$("releaseInfo.artistCommentary")}
- ${generateCommentary({link, language, transformMultiline})}
+ ${generateCommentary({
+ link,
+ language,
+ transformMultiline,
+ })}
- `}
- `
- },
+ `
+ }
+ `,
+ },
- sidebarLeft: generateAlbumSidebar(album, track, {
- fancifyURL,
- getLinkThemeString,
- link,
- language,
- transformMultiline,
- wikiData
- }),
+ sidebarLeft: generateAlbumSidebar(album, track, {
+ fancifyURL,
+ getLinkThemeString,
+ link,
+ language,
+ transformMultiline,
+ wikiData,
+ }),
- nav: {
- linkContainerClasses: ['nav-links-hierarchy'],
- links: [
- {toHome: true},
- {
- path: ['localized.album', album.directory],
- title: album.name
- },
- listTag === 'ol' ? {
- html: language.$('trackPage.nav.track.withNumber', {
- number: album.tracks.indexOf(track) + 1,
- track: link.track(track, {class: 'current', to})
- })
- } : {
- html: language.$('trackPage.nav.track', {
- track: link.track(track, {class: 'current', to})
- })
- },
- ].filter(Boolean),
- content: generateAlbumChronologyLinks(album, track, {generateChronologyLinks}),
- bottomRowContent: (album.tracks.length > 1 &&
- generateAlbumNavLinks(album, track, {
- generatePreviousNextLinks,
- language,
- })),
+ nav: {
+ linkContainerClasses: ["nav-links-hierarchy"],
+ links: [
+ { toHome: true },
+ {
+ path: ["localized.album", album.directory],
+ title: album.name,
+ },
+ listTag === "ol"
+ ? {
+ html: language.$("trackPage.nav.track.withNumber", {
+ number: album.tracks.indexOf(track) + 1,
+ track: link.track(track, { class: "current", to }),
+ }),
+ }
+ : {
+ html: language.$("trackPage.nav.track", {
+ track: link.track(track, { class: "current", to }),
+ }),
},
+ ].filter(Boolean),
+ content: generateAlbumChronologyLinks(album, track, {
+ generateChronologyLinks,
+ }),
+ bottomRowContent:
+ album.tracks.length > 1 &&
+ generateAlbumNavLinks(album, track, {
+ generatePreviousNextLinks,
+ language,
+ }),
+ },
- secondaryNav: generateAlbumSecondaryNav(album, track, {
- language,
- link,
- getLinkThemeString,
- }),
- };
- }
- };
+ secondaryNav: generateAlbumSecondaryNav(album, track, {
+ language,
+ link,
+ getLinkThemeString,
+ }),
+ };
+ },
+ };
- return [data, page];
+ return [data, page];
}
-
--
cgit 1.3.0-6-gf8a5