From 6e5f9a1e246640ddfa8472cf3dcb02baf9603c75 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 17 Jan 2024 14:00:01 -0400 Subject: content: generateTrackInfoPage: move sample list below ref list --- src/content/dependencies/generateTrackInfoPage.js | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/content/dependencies') diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 25664148..ef38ba6b 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -196,6 +196,18 @@ export default { relation('generateTrackList', track.referencedTracks); } + // Section: Sampled tracks + + if (!empty(track.sampledTracks)) { + const samples = sections.samples = {}; + + samples.heading = + relation('generateContentHeading'); + + samples.list = + relation('generateTrackList', track.sampledTracks); + } + // Section: Tracks that reference if (!empty(track.referencedByTracks)) { @@ -210,18 +222,6 @@ export default { sprawl.divideTrackListsByGroups); } - // Section: Sampled tracks - - if (!empty(track.sampledTracks)) { - const samples = sections.samples = {}; - - samples.heading = - relation('generateContentHeading'); - - samples.list = - relation('generateTrackList', track.sampledTracks); - } - // Section: Tracks that sample if (!empty(track.sampledByTracks)) { @@ -436,30 +436,30 @@ export default { sec.references.list, ], - sec.referencedBy && [ - sec.referencedBy.heading + sec.samples && [ + sec.samples.heading .slots({ - id: 'referenced-by', + id: 'samples', title: - language.$('releaseInfo.tracksThatReference', { + language.$('releaseInfo.tracksSampled', { track: html.tag('i', data.name), }), }), - sec.referencedBy.list, + sec.samples.list, ], - sec.samples && [ - sec.samples.heading + sec.referencedBy && [ + sec.referencedBy.heading .slots({ - id: 'samples', + id: 'referenced-by', title: - language.$('releaseInfo.tracksSampled', { + language.$('releaseInfo.tracksThatReference', { track: html.tag('i', data.name), }), }), - sec.samples.list, + sec.referencedBy.list, ], sec.sampledBy && [ -- cgit 1.3.0-6-gf8a5