From c2c5ecfac8610941937dcf21f4109984487c48dd Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 3 Apr 2024 18:06:31 -0300 Subject: content: generateAlbumSidebar: fix album page box order --- src/content/dependencies/generateAlbumSidebar.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/generateAlbumSidebar.js b/src/content/dependencies/generateAlbumSidebar.js index f014139c..355a9a9a 100644 --- a/src/content/dependencies/generateAlbumSidebar.js +++ b/src/content/dependencies/generateAlbumSidebar.js @@ -28,19 +28,20 @@ export default { generate: (data, relations) => relations.sidebar.slots({ boxes: [ + data.isAlbumPage && + relations.groupBoxes + .map(box => box.slot('mode', 'album')), + relations.trackListBox, - (data.isAlbumPage - ? relations.groupBoxes - .map(box => box.slot('mode', 'album')) - - : relations.conjoinedBox.slots({ - attributes: {class: 'conjoined-group-sidebar-box'}, - boxes: - relations.groupBoxes - .map(box => box.slot('mode', 'track')) - .map(box => box.content), /* TODO: Kludge. */ - })), + !data.isAlbumPage && + relations.conjoinedBox.slots({ + attributes: {class: 'conjoined-group-sidebar-box'}, + boxes: + relations.groupBoxes + .map(box => box.slot('mode', 'track')) + .map(box => box.content), /* TODO: Kludge. */ + }), ], }), }; -- cgit 1.3.0-6-gf8a5