« get me outta code hell

art-tag.js « page « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/art-tag.js
blob: 5b61229d48f33764dfe5efa75d77f7ebd0bb98ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Art tag page specification.

export const description = `per-art-tag info & 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: ['artTagInfo', tag.directory],

      contentFunction: {
        name: 'generateArtTagInfoPage',
        args: [tag],
      },
    },

    {
      type: 'page',
      path: ['artTagGallery', tag.directory],

      contentFunction: {
        name: 'generateArtTagGalleryPage',
        args: [tag],
      },
    },
  ];
}