« get me outta code hell

generateArtTagAncestorSidebarBox.js « dependencies « content « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateArtTagAncestorSidebarBox.js
blob: ea85c2b2c6fa72304552d211d067b4acfc93aa96 (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
export default {
  contentDependencies: [
    'generateArtTagAncestorDescendantMapList',
    'linkArtTagDynamically',
  ],

  extraDependencies: ['html'],

  relations: (relation, ancestorArtTag, descendantArtTag) => ({
    ancestorArtTagLink:
      relation('linkArtTagDynamically', ancestorArtTag),

    ancestorArtTagMapList:
      relation('generateArtTagAncestorDescendantMapList',
        ancestorArtTag,
        descendantArtTag),
  }),

  generate: (relations, {html}) => ({
    content: html.tags([
      html.tag('h2',
        relations.ancestorArtTagLink),

      relations.ancestorArtTagMapList,
    ]),
  }),
};