From 76d09e26503a9d2168ea2ee831125d61a6f39384 Mon Sep 17 00:00:00 2001 From: Milan Lakhani Date: Wed, 10 Aug 2022 08:25:12 +0100 Subject: [PATCH] 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 788b3c48..e9a3c990 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];