From 3a5b49cf3a10702c0dae1190c9baabd8a2c2ef3b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 12 Apr 2023 13:20:32 -0300 Subject: content: stub track page, misc. other changes * generateContributionLinks replaced with linkContribution, tests still need updating * album pages respect albums without cover art * track pages without unique art inherit art tags from album (fixes #13) not heavily tested, this commit probably breaks some pages which were loading correctly before --- src/content/dependencies/generateAlbumInfoPage.js | 37 ++++++++--------------- 1 file changed, 13 insertions(+), 24 deletions(-) (limited to 'src/content/dependencies/generateAlbumInfoPage.js') diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js index 5c575cb2..e5ce193c 100644 --- a/src/content/dependencies/generateAlbumInfoPage.js +++ b/src/content/dependencies/generateAlbumInfoPage.js @@ -7,37 +7,26 @@ export default { 'generatePageLayout', ], - extraDependencies: [ - 'language', - ], + extraDependencies: ['language'], relations(relation, album) { - const relations = {}; - - relations.layout = relation('generatePageLayout'); - - relations.content = relation('generateAlbumInfoPageContent', album); - relations.socialEmbed = relation('generateAlbumSocialEmbed', album); - relations.albumStyleRules = relation('generateAlbumStyleRules', album); - relations.colorStyleRules = relation('generateColorStyleRules', album.color); - - return relations; + return { + layout: relation('generatePageLayout'), + + content: relation('generateAlbumInfoPageContent', album), + socialEmbed: relation('generateAlbumSocialEmbed', album), + albumStyleRules: relation('generateAlbumStyleRules', album), + colorStyleRules: relation('generateColorStyleRules', album.color), + }; }, data(album) { - const data = {}; - - data.name = album.name; - data.color = album.color; - - return data; + return { + name: album.name, + }; }, - generate(data, relations, { - language, - }) { - // page.themeColor = data.color; - + generate(data, relations, {language}) { return relations.layout .slots({ title: language.$('albumPage.title', {album: data.name}), -- cgit 1.3.0-6-gf8a5