From 985e0174c58bf75268cb278b4319a26fdd4bc42d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 27 May 2025 16:27:05 -0300 Subject: content: generatePageLayout: styleTags alongside styleRules --- src/content/dependencies/generatePageLayout.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/content/dependencies/generatePageLayout.js b/src/content/dependencies/generatePageLayout.js index 59c0be5f..147e2a5e 100644 --- a/src/content/dependencies/generatePageLayout.js +++ b/src/content/dependencies/generatePageLayout.js @@ -120,6 +120,11 @@ export default { default: [], }, + styleTags: { + type: 'html', + mutable: false, + }, + mainClasses: { validate: v => v.sparseArrayOf(v.isString), default: [], @@ -594,11 +599,13 @@ export default { ])), ]); - const fakeStyleTags = - slots.styleRules.map(rule => html.tag('style', rule)); + const slottedStyleTags = html.tags([ + slots.styleRules.map(rule => html.tag('style', rule)), + slots.styleTags, + ]); const styleTagsCSS = - html.smush(/*slots.styleTags*/ fakeStyleTags) + html.smush(slottedStyleTags) .content .map(tag => html.resolve(tag.content, {normalize: 'string'})) @@ -762,7 +769,7 @@ export default { fallbackWallpaperStyleTag, - fakeStyleTags, + slottedStyleTags, html.tag('script', { src: to('staticLib.path', 'chroma-js/chroma.min.js'), -- cgit 1.3.0-6-gf8a5