diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-03-19 16:26:55 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-03-19 16:26:55 -0300 |
commit | 41c22a553d43fbcc04b7a17ec6f83583ed7f3443 (patch) | |
tree | 88f8c25b84a586c31529ea95f96e51d2f6d78553 /src/page | |
parent | 7411fe87dc667b25f265f5388b790c5d4bbc880d (diff) |
data step: content function updates, relation syntax 2
* new: generateAlbumTrackListItem * new: generateContributionLinks
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/album.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/page/album.js b/src/page/album.js index 4cf9fd99..9e1d8c9f 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -150,68 +150,6 @@ export const dataSteps = { }, }; -const u_generateTrackListItem = contentFunction({ - contentDependencies: [ - 'generateContributionLinks', - ], - - extraDependencies: [ - 'getLinkThemeString', - 'html', - 'language', - 'link', - ], - - data: function(track, { - generateContributionLinks, - }) { - return { - color: track.color, - duration: track.duration ?? 0, - linkData: u_link.track.data(track), - - showArtists: - !compareArrays( - track.artistContribs.map(c => c.who), - track.album.artistContribs.map(c => c.who), - {checkOrder: false}), - - contributionLinksData: - generateContributionLinks.data(track.artistContribs, { - showContribution: false, - showIcons: false, - }), - }; - }, - - generate: function generateTrackListItem(data, { - generateContributionLinks, - - getLinkThemeString, - html, - language, - link, - }) { - const stringOpts = { - duration: language.formatDuration(data.duration), - track: link.track(data.linkData), - }; - - return html.tag('li', - {style: getLinkThemeString(data.color)}, - (!data.showArtists - ? language.$('trackList.item.withDuration', stringOpts) - : language.$('trackList.item.withDuration.withArtists', { - ...stringOpts, - by: - html.tag('span', {class: 'by'}, - language.$('trackList.item.withArtists.by', { - artists: generateContributionLinks(data.contributionLinksData), - })), - }))); - }, -}); - /* const infoPage = { page: () => { |