« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateFlashActGalleryPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateFlashActGalleryPage.js')
-rw-r--r--src/content/dependencies/generateFlashActGalleryPage.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/content/dependencies/generateFlashActGalleryPage.js b/src/content/dependencies/generateFlashActGalleryPage.js
index 1fa6de51..84ab549d 100644
--- a/src/content/dependencies/generateFlashActGalleryPage.js
+++ b/src/content/dependencies/generateFlashActGalleryPage.js
@@ -1,4 +1,4 @@
-import {stitchArrays} from '#sugar';
+import striptags from 'striptags';
 
 export default {
   contentDependencies: [
@@ -8,6 +8,7 @@ export default {
     'generatePageLayout',
     'image',
     'linkFlash',
+    'linkFlashAct',
     'linkFlashIndex',
   ],
 
@@ -20,6 +21,9 @@ export default {
     flashIndexLink:
       relation('linkFlashIndex'),
 
+    flashActNavLink:
+      relation('linkFlashAct', act),
+
     flashActNavAccent:
       relation('generateFlashActNavAccent', act),
 
@@ -31,7 +35,7 @@ export default {
 
     coverGridImages:
       act.flashes
-        .map(_flash => relation('image')),
+        .map(flash => relation('image', flash.coverArtwork)),
 
     flashLinks:
       act.flashes
@@ -44,10 +48,6 @@ export default {
 
     flashNames:
       act.flashes.map(flash => flash.name),
-
-    flashCoverPaths:
-      act.flashes.map(flash =>
-        ['media.flashArt', flash.directory, flash.coverArtFileExtension])
   }),
 
   generate: (data, relations, {language}) =>
@@ -55,7 +55,7 @@ export default {
       relations.layout.slots({
         title:
           language.$(pageCapsule, 'title', {
-            flash: data.name,
+            flash: striptags(data.name),
           }),
 
         color: data.color,
@@ -65,15 +65,9 @@ export default {
         mainContent: [
           relations.coverGrid.slots({
             links: relations.flashLinks,
+            images: relations.coverGridImages,
             names: data.flashNames,
             lazy: 6,
-
-            images:
-              stitchArrays({
-                image: relations.coverGridImages,
-                path: data.flashCoverPaths,
-              }).map(({image, path}) =>
-                  image.slot('path', path)),
           }),
         ],
 
@@ -81,7 +75,7 @@ export default {
         navLinks: [
           {auto: 'home'},
           {html: relations.flashIndexLink},
-          {auto: 'current'},
+          {html: relations.flashActNavLink},
         ],
 
         navBottomRowContent: relations.flashActNavAccent,