diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-04-08 17:15:20 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-04-08 18:26:12 -0300 |
commit | 392d6ec799c87ef536335211cb34b1b795147369 (patch) | |
tree | f2e0cd219e4a8bbc316dd54071aab3bd2ce02b21 /src/content/dependencies | |
parent | d406c50e3b51d2d370a6331f1aaf9603782594b9 (diff) |
content: generatePageLayout: display provided styleRules
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateAlbumInfoPage.js | 9 | ||||
-rw-r--r-- | 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}`), |