« get me outta code hell

support art tag info pages; ensure "art tag" terminology everywhere - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/art-tag.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-04 13:16:50 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-02-25 20:03:25 -0400
commitaea4995ff0aea1baf9fd4aaaf4cf096a53e94f99 (patch)
tree9d0dada7d8034c7da7eef746dce2ec9de491b572 /src/page/art-tag.js
parentb27d61ca43cc1e8e8dcb0a94fbfcf77d1e32c548 (diff)
support art tag info pages; ensure "art tag" terminology everywhere
Diffstat (limited to 'src/page/art-tag.js')
-rw-r--r--src/page/art-tag.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/page/art-tag.js b/src/page/art-tag.js
new file mode 100644
index 00000000..32e869e1
--- /dev/null
+++ b/src/page/art-tag.js
@@ -0,0 +1,25 @@
+// Art tag page specification.
+
+export const description = `per-art-tag gallery pages`;
+
+export function condition({wikiData}) {
+  return wikiData.wikiInfo.enableArtTagUI;
+}
+
+export function targets({wikiData}) {
+  return wikiData.artTagData.filter((tag) => !tag.isContentWarning);
+}
+
+export function pathsForTarget(tag) {
+  return [
+    {
+      type: 'page',
+      path: ['artTagGallery', tag.directory],
+
+      contentFunction: {
+        name: 'generateArtTagGalleryPage',
+        args: [tag],
+      },
+    },
+  ];
+}