From 81e7947f1c4a8a795fa4be7aa797683692391d41 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 28 Dec 2022 20:15:05 -0400 Subject: 'Listed in Albums' gallery flag --- src/data/things/album.js | 1 + src/data/yaml.js | 1 + src/page/group.js | 14 ++++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/data/things/album.js b/src/data/things/album.js index 281da871..ade34e3d 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -82,6 +82,7 @@ export class Album extends Thing { hasTrackNumbers: Thing.common.flag(true), isMajorRelease: Thing.common.flag(false), isListedOnHomepage: Thing.common.flag(true), + isListedInGalleries: Thing.common.flag(true), commentary: Thing.common.commentary(), additionalFiles: Thing.common.additionalFiles(), diff --git a/src/data/yaml.js b/src/data/yaml.js index a5a0e798..83368832 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -217,6 +217,7 @@ export const processAlbumDocument = makeProcessDocument(T.Album, { hasTrackNumbers: 'Has Track Numbers', isMajorRelease: 'Major Release', isListedOnHomepage: 'Listed on Homepage', + isListedInGalleries: 'Listed in Galleries', groupsByRef: 'Groups', artTagsByRef: 'Art Tags', diff --git a/src/page/group.js b/src/page/group.js index 26230b45..6bfd1532 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -190,12 +190,14 @@ export function write(group, {wikiData}) { {class: 'grid-listing'}, getAlbumGridHTML({ entries: sortChronologically( - group.albums.map(album => ({ - item: album, - directory: album.directory, - name: album.name, - date: album.date, - })) + group.albums + .filter(album => album.isListedInGalleries) + .map(album => ({ + item: album, + directory: album.directory, + name: album.name, + date: album.date, + })) ).reverse(), details: true, })), -- cgit 1.3.0-6-gf8a5