« get me outta code hell

implement flash act pages, rework flash sidebar layout - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-11 14:32:28 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-11 14:44:34 -0300
commit3a871cf43a11b87392d26320c736b516925da684 (patch)
tree113eb17e10d4f542366578111bdaa169985911be /src/page
parent3cd6f9edc58171e33ed6af565db84113e2488f25 (diff)
implement flash act pages, rework flash sidebar layout
Diffstat (limited to 'src/page')
-rw-r--r--src/page/flash-act.js23
-rw-r--r--src/page/index.js1
2 files changed, 24 insertions, 0 deletions
diff --git a/src/page/flash-act.js b/src/page/flash-act.js
new file mode 100644
index 00000000..e54525ae
--- /dev/null
+++ b/src/page/flash-act.js
@@ -0,0 +1,23 @@
+export const description = `flash act gallery pages`;
+
+export function condition({wikiData}) {
+  return wikiData.wikiInfo.enableFlashesAndGames;
+}
+
+export function targets({wikiData}) {
+  return wikiData.flashActData;
+}
+
+export function pathsForTarget(flashAct) {
+  return [
+    {
+      type: 'page',
+      path: ['flashActGallery', flashAct.directory],
+
+      contentFunction: {
+        name: 'generateFlashActGalleryPage',
+        args: [flashAct],
+      },
+    },
+  ];
+}
diff --git a/src/page/index.js b/src/page/index.js
index 48e22d2e..21d93c8f 100644
--- a/src/page/index.js
+++ b/src/page/index.js
@@ -2,6 +2,7 @@ export * as album from './album.js';
 export * as artist from './artist.js';
 export * as artistAlias from './artist-alias.js';
 export * as flash from './flash.js';
+export * as flashAct from './flash-act.js';
 export * as group from './group.js';
 export * as homepage from './homepage.js';
 export * as listing from './listing.js';