diff options
Diffstat (limited to 'src/content/dependencies')
3 files changed, 7 insertions, 55 deletions
diff --git a/src/content/dependencies/generateReferencedTracksList.js b/src/content/dependencies/generateReferencedTracksList.js index 1d566ce9..9a211998 100644 --- a/src/content/dependencies/generateReferencedTracksList.js +++ b/src/content/dependencies/generateReferencedTracksList.js @@ -1,29 +1,25 @@ export default { relations: (relation, track) => ({ - previousProductionTrackList: - relation('generateNearbyTrackList', - track.previousProductionTracks, - track, - track.artistContribs), - - referencedTrackList: + trackList: relation('generateNearbyTrackList', track.referencedTracks, track, []), }), - generate: (relations, {html, language}) => + generate: (relations, {html}) => html.tag('ul', {[html.onlyIfContent]: true}, [ + // This code is kept here because it's probably the only + // detailed example of html.inside() lol + /* html.inside(relations.previousProductionTrackList) .map(li => html.inside(li)) .map(label => html.tag('li', language.$('trackList.item.previousProduction', {track: label}))), + */ - html.inside(relations.referencedTrackList), + html.inside(relations.trackList), ]), }; - - diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index d3c2d766..0937c42c 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -83,9 +83,6 @@ export default { otherReleasesLine: relation('generateTrackInfoPageOtherReleasesLine', track), - previousProductionLine: - relation('generateTrackInfoPagePreviousProductionLine', track), - contributorContributionList: relation('generateContributionList', track.contributorContribs), @@ -234,9 +231,6 @@ export default { html.tag('p', {[html.onlyIfContent]: true}, relations.otherReleasesLine), - html.tag('p', {[html.onlyIfContent]: true}, - relations.previousProductionLine), - html.tags([ relations.contentHeading.clone() .slots({ diff --git a/src/content/dependencies/generateTrackInfoPagePreviousProductionLine.js b/src/content/dependencies/generateTrackInfoPagePreviousProductionLine.js deleted file mode 100644 index f7f455c1..00000000 --- a/src/content/dependencies/generateTrackInfoPagePreviousProductionLine.js +++ /dev/null @@ -1,38 +0,0 @@ -import {stitchArrays} from '#sugar'; -import {getKebabCase} from '#wiki-data'; - -export default { - relations: (relation, track) => ({ - trackLinks: - track.followingProductionTracks - .map(track => relation('linkTrack', track)), - - albumLinks: - track.followingProductionTracks - .map(following => - (following.album !== track.album && - getKebabCase(following.name) === getKebabCase(track.name) - - ? relation('linkAlbum', following.album) - : null)), - }), - - generate: (relations, {language}) => - language.encapsulate('releaseInfo.previousProduction', capsule => - language.$(capsule, { - [language.onlyIfOptions]: ['tracks'], - - tracks: - language.formatConjunctionList( - stitchArrays({ - trackLink: relations.trackLinks, - albumLink: relations.albumLinks, - }).map(({trackLink, albumLink}) => - (albumLink - ? language.$(capsule, 'trackOnAlbum', { - track: trackLink, - album: albumLink, - }) - : trackLink))), - })), -}; |