diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-06-10 16:56:43 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-06-10 16:56:43 -0300 |
commit | 3318ceb4b7685abeaa2daec111ef503feacaefd9 (patch) | |
tree | 889bef53b1cc74ba0c0af18954e972296e25818e | |
parent | 18455459a991c3da8b32e2c47c4795dc90c6b422 (diff) |
reverse sort things on art tag page
-rw-r--r-- | src/page/tag.js | 8 |
1 files changed, 7 insertions, 1 deletions
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}) { })}</p> <div class="grid-listing"> ${getGridHTML({ - entries: things.map(item => ({item})), + entries, srcFn: thing => (thing.album ? getTrackCover(thing) : getAlbumCover(thing)), |