« get me outta code hell

content, data: experimental art tag sidebar - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-05 23:22:43 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-05 23:22:43 -0300
commit62d7e0146d471e7623e4ec384a928a828b8780e9 (patch)
tree790fb2246ccc9a6dbf64db6d21c6fa4886aac79c /src/data/things
parentabb73f5e8a2361d133736a6cc5bed5c98206a814 (diff)
content, data: experimental art tag sidebar
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/art-tag.js8
-rw-r--r--src/data/things/language.js1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/data/things/art-tag.js b/src/data/things/art-tag.js
index 707b3c93..a530ba8c 100644
--- a/src/data/things/art-tag.js
+++ b/src/data/things/art-tag.js
@@ -19,7 +19,8 @@ import {
   wikiData,
 } from '#composite/wiki-properties';
 
-import {withAllDescendantArtTags} from '#composite/things/art-tag';
+import {withAllDescendantArtTags, withAncestorArtTagBaobabTree}
+  from '#composite/things/art-tag';
 
 import Thing from './thing.js';
 
@@ -110,5 +111,10 @@ export class ArtTag extends Thing {
       data: 'artTagData',
       list: input.value('directDescendantArtTags'),
     }),
+
+    ancestorArtTagBaobabTree: [
+      withAncestorArtTagBaobabTree(),
+      exposeDependency({dependency: '#ancestorArtTagBaobabTree'}),
+    ],
   });
 }
diff --git a/src/data/things/language.js b/src/data/things/language.js
index fe74f7bf..cd719d0c 100644
--- a/src/data/things/language.js
+++ b/src/data/things/language.js
@@ -376,6 +376,7 @@ Object.assign(Language.prototype, {
   countAdditionalFiles: countHelper('additionalFiles', 'files'),
   countAlbums: countHelper('albums'),
   countArtworks: countHelper('artworks'),
+  countArtTags: countHelper('artTags', 'tags'),
   countFlashes: countHelper('flashes'),
   countCommentaryEntries: countHelper('commentaryEntries', 'entries'),
   countContributions: countHelper('contributions'),