From 9df43a8eb9829e03de55df023fa2b53e53527c3b Mon Sep 17 00:00:00 2001 From: Milan Lakhani Date: Wed, 10 Aug 2022 08:25:12 +0100 Subject: [PATCH] (renderItems): Add capacity for extra_css in settings.yml This flag in the global section of settings.yml allows landscapes to have custom CSS properties set. Signed-off-by: Milan Lakhani --- tools/renderItems.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/renderItems.js b/tools/renderItems.js index f941efbc..8f36f94d 100644 --- a/tools/renderItems.js +++ b/tools/renderItems.js @@ -100,7 +100,7 @@ async function main() { const js = await fs.readFile('src/script.js', 'utf-8'); const css = await fs.readFile('src/style.css', 'utf-8'); // preprocess css media queries - let processedCss = css; + let processedCss = css.concat("\n\n"+settings.global.extra_css || ""); const match = css.match(/(--\w+-screen:\s\d+px)/g); for(let cssVar of match) { const value = cssVar.match(/(\d+px)/)[0];