« get me outta code hell

properly support 4-18 item carousels - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-12-28 18:25:51 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-12-28 18:25:51 -0400
commit0fbce8a83c33a17821716d662c86a95848c7e58a (patch)
tree1b8ec19521e8390cf5e6f70893b1d4c37decef93 /src/data
parent4431905279d30f2f987cea1e40805ffdd7d61b5b (diff)
properly support 4-18 item carousels
Diffstat (limited to 'src/data')
-rw-r--r--src/data/things/group.js4
-rw-r--r--src/data/yaml.js2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/data/things/group.js b/src/data/things/group.js
index 26fe9a55..111d6715 100644
--- a/src/data/things/group.js
+++ b/src/data/things/group.js
@@ -17,6 +17,8 @@ export class Group extends Thing {
 
     urls: Thing.common.urls(),
 
+    featuredAlbumsByRef: Thing.common.referenceList(Album),
+
     // Update only
 
     albumData: Thing.common.wikiData(Album),
@@ -24,6 +26,8 @@ export class Group extends Thing {
 
     // Expose only
 
+    featuredAlbums: Thing.common.dynamicThingsFromReferenceList('featuredAlbumsByRef', 'albumData', find.album),
+
     descriptionShort: {
       flags: {expose: true},
 
diff --git a/src/data/yaml.js b/src/data/yaml.js
index f967cee3..a5a0e798 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -356,6 +356,8 @@ export const processGroupDocument = makeProcessDocument(T.Group, {
     directory: 'Directory',
     description: 'Description',
     urls: 'URLs',
+
+    featuredAlbumsByRef: 'Featured Albums',
   },
 });