From 392d6ec799c87ef536335211cb34b1b795147369 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 8 Apr 2023 17:15:20 -0300 Subject: content: generatePageLayout: display provided styleRules --- src/content/dependencies/generateAlbumInfoPage.js | 9 ++++----- src/content/dependencies/generatePageLayout.js | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js index f0a23259..5c575cb2 100644 --- a/src/content/dependencies/generateAlbumInfoPage.js +++ b/src/content/dependencies/generateAlbumInfoPage.js @@ -38,14 +38,13 @@ export default { }) { // page.themeColor = data.color; - // page.styleRules = [ - // relations.albumStyleRules, - // relations.colorStyleRules, - // ]; - return relations.layout .slots({ title: language.$('albumPage.title', {album: data.name}), + styleRules: [ + relations.albumStyleRules, + relations.colorStyleRules, + ], cover: relations.content.cover, mainContent: relations.content.main.content, diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index f36a7bb5..9abac0a2 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -26,6 +26,11 @@ export default { default: 'static', }, + styleRules: { + validate: v => v.arrayOf(v.isString), + default: [], + }, + mainClasses: { validate: v => v.arrayOf(v.isString), default: [], @@ -162,14 +167,9 @@ export default { href: to('shared.staticFile', `site3.css?${cachebust}`), }), - /* html.tag('style', {[html.onlyIfContent]: true}, - [ - theme, - stylesheet, - ]), - */ + slots.styleRules), html.tag('script', { src: to('shared.staticFile', `lazy-loading.js?${cachebust}`), -- cgit 1.3.0-6-gf8a5