From 3318ceb4b7685abeaa2daec111ef503feacaefd9 Mon Sep 17 00:00:00 2001
From: "(quasar) nebula"
Date: Thu, 10 Jun 2021 16:56:43 -0300
Subject: reverse sort things on art tag page
---
src/page/tag.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
(limited to 'src/page')
diff --git a/src/page/tag.js b/src/page/tag.js
index 610f4665..39bfda60 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -18,6 +18,12 @@ export function write(tag, {wikiData}) {
const { wikiInfo } = wikiData;
const { things } = tag;
+ // Display things featuring this art tag in reverse chronological order,
+ // sticking the most recent additions near the top!
+ const thingsReversed = things.slice().reverse();
+
+ const entries = thingsReversed.map(item => ({item}));
+
const page = {
type: 'page',
path: ['tag', tag.directory],
@@ -42,7 +48,7 @@ export function write(tag, {wikiData}) {
})}
${getGridHTML({
- entries: things.map(item => ({item})),
+ entries,
srcFn: thing => (thing.album
? getTrackCover(thing)
: getAlbumCover(thing)),
--
cgit 1.3.0-6-gf8a5