From 878a96cb223783ef1b100fdb3bb9d795404c44f5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Apr 2023 15:39:55 -0300 Subject: sort art galleries reverse-chronologically (again) Fixes #170. --- src/page/artist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/page') diff --git a/src/page/artist.js b/src/page/artist.js index 87859c8..29e4aba 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -40,7 +40,7 @@ export function write(artist, {wikiData}) { ...(artist.albumsAsCoverArtist ?? []), ...(artist.tracksAsCoverArtist ?? []), ], - {getDate: (o) => o.coverArtDate}); + {latestFirst: true, getDate: (o) => o.coverArtDate}); const commentaryThings = sortAlbumsTracksChronologically([ ...(artist.albumsAsCommentator ?? []), -- cgit 1.3.0-6-gf8a5 From 6128ba16c1b5c4c6095e0ddba0977817cce4bc6e Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 27 Apr 2023 16:55:06 -0300 Subject: data: new sortByPositionInFlash act function Fixes #168. This refactors the duplicated logic with sortByPositionInAlbum into a new template, sortByPositionInParent. --- src/page/artist.js | 4 ++-- src/page/track.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/page') diff --git a/src/page/artist.js b/src/page/artist.js index 29e4aba..4ef44d3 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -12,7 +12,7 @@ import { chunkByProperties, getTotalDuration, sortAlbumsTracksChronologically, - sortChronologically, + sortFlashesChronologically, } from '../util/wiki-data.js'; export const description = `per-artist info & artwork gallery pages`; @@ -129,7 +129,7 @@ export function write(artist, {wikiData}) { let flashes, flashListChunks; if (wikiInfo.enableFlashesAndGames) { - flashes = sortChronologically(artist.flashesAsContributor.slice()); + flashes = sortFlashesChronologically(artist.flashesAsContributor.slice()); flashListChunks = chunkByProperties( flashes.map((flash) => ({ act: flash.act, diff --git a/src/page/track.js b/src/page/track.js index 7f0d1cf..b6b03f3 100644 --- a/src/page/track.js +++ b/src/page/track.js @@ -16,7 +16,7 @@ import { import { getTrackCover, getAlbumListTag, - sortChronologically, + sortFlashesChronologically, } from '../util/wiki-data.js'; export const description = `per-track info pages`; @@ -42,7 +42,7 @@ export function write(track, {wikiData}) { let flashesThatFeature; if (wikiInfo.enableFlashesAndGames) { - flashesThatFeature = sortChronologically( + flashesThatFeature = sortFlashesChronologically( [track, ...otherReleases].flatMap((track) => track.featuredInFlashes.map((flash) => ({ flash, -- cgit 1.3.0-6-gf8a5