« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/track.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/page/track.js')
-rw-r--r--src/page/track.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/page/track.js b/src/page/track.js
index e75b6958..95647334 100644
--- a/src/page/track.js
+++ b/src/page/track.js
@@ -1,5 +1,7 @@
 // Track page specification.
 
+import {empty} from '#sugar';
+
 export const description = `per-track info pages`;
 
 export function targets({wikiData}) {
@@ -17,5 +19,33 @@ export function pathsForTarget(track) {
         args: [track],
       },
     },
+
+    {
+      type: 'page',
+      path: ['trackReferencedArtworks', track.directory],
+
+      condition: () =>
+        track.hasUniqueCoverArt &&
+        !empty(track.trackArtworks[0].referencedArtworks),
+
+      contentFunction: {
+        name: 'generateTrackReferencedArtworksPage',
+        args: [track],
+      },
+    },
+
+    {
+      type: 'page',
+      path: ['trackReferencingArtworks', track.directory],
+
+      condition: () =>
+        track.hasUniqueCoverArt &&
+        !empty(track.trackArtworks[0].referencedByArtworks),
+
+      contentFunction: {
+        name: 'generateTrackReferencingArtworksPage',
+        args: [track],
+      },
+    },
   ];
 }