diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 13:33:32 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-12 17:32:56 -0300 |
commit | 01417566d7772f7a678c321baf3dd527498844a4 (patch) | |
tree | f5179f7e66b6fccf1854eb9c9a35cc1dc99446ec /src/content/dependencies/generateTrackInfoPage.js | |
parent | 2be0b6fc1983ba69829517257ee4d0b098cc4624 (diff) |
content: generateTrackInfoPage: simpler reverse ref list layout
Diffstat (limited to 'src/content/dependencies/generateTrackInfoPage.js')
-rw-r--r-- | src/content/dependencies/generateTrackInfoPage.js | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index fed073e6..336cebbb 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -112,25 +112,17 @@ export default { // Section: Tracks that reference - if (!empty(track.referencedByTracks)) { - const referencedBy = sections.referencedBy = {}; - - referencedBy.list = - relation('generateTrackListDividedByGroups', - track.referencedByTracks, - sprawl.divideTrackListsByGroups); - } + relations.referencedByTracksList = + relation('generateTrackListDividedByGroups', + track.referencedByTracks, + sprawl.divideTrackListsByGroups); // Section: Tracks that sample - if (!empty(track.sampledByTracks)) { - const sampledBy = sections.sampledBy = {}; - - sampledBy.list = - relation('generateTrackListDividedByGroups', - track.sampledByTracks, - sprawl.divideTrackListsByGroups); - } + relations.sampledByTracksList = + relation('generateTrackListDividedByGroups', + track.sampledByTracks, + sprawl.divideTrackListsByGroups); // Section: Flashes that feature @@ -321,7 +313,7 @@ export default { relations.sampledTracksList, ]), - sec.referencedBy && [ + html.tags([ relations.contentHeading.clone() .slots({ attributes: {id: 'referenced-by'}, @@ -335,16 +327,16 @@ export default { language.$('releaseInfo.tracksThatReference.sticky'), }), - sec.referencedBy.list + relations.referencedByTracksList .slots({ headingString: 'releaseInfo.tracksThatReference', }), - ], + ]), - sec.sampledBy && [ + html.tags([ relations.contentHeading.clone() .slots({ - attributes: {id: 'referenced-by'}, + attributes: {id: 'sampled-by'}, title: language.$('releaseInfo.tracksThatSample', { @@ -355,11 +347,11 @@ export default { language.$('releaseInfo.tracksThatSample.sticky'), }), - sec.sampledBy.list + relations.sampledByTracksList .slots({ headingString: 'releaseInfo.tracksThatSample', }), - ], + ]), sec.flashesThatFeature && [ relations.contentHeading.clone() |