« 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/generateArtTagAncestorSidebarBox.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateArtTagAncestorSidebarBox.js')
-rw-r--r--src/content/dependencies/generateArtTagAncestorSidebarBox.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/content/dependencies/generateArtTagAncestorSidebarBox.js b/src/content/dependencies/generateArtTagAncestorSidebarBox.js
new file mode 100644
index 00000000..ea85c2b2
--- /dev/null
+++ b/src/content/dependencies/generateArtTagAncestorSidebarBox.js
@@ -0,0 +1,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,
+    ]),
+  }),
+};