« get me outta code hell

content: generateTrackInfoPage: move sample list below ref list - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-01-17 14:00:01 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-17 14:00:01 -0400
commit6e5f9a1e246640ddfa8472cf3dcb02baf9603c75 (patch)
treefa0afe3e24205b21f2a186a82abf3b8246f3121b
parent33e73ad062c6155864c30812476f9347150d6c8c (diff)
content: generateTrackInfoPage: move sample list below ref list
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js44
1 files changed, 22 insertions, 22 deletions
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 && [