From f842a27d23aa68f4d4c727dcf70c175241eb36ec Mon Sep 17 00:00:00 2001 From: Felix Wiegand Date: Mon, 22 Jan 2024 13:38:35 +0100 Subject: [PATCH] Update index.ytml.yaml --- locosopa/src/index.ytml.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/locosopa/src/index.ytml.yaml b/locosopa/src/index.ytml.yaml index 0c74989..b5caaeb 100644 --- a/locosopa/src/index.ytml.yaml +++ b/locosopa/src/index.ytml.yaml @@ -6,6 +6,9 @@ __definitions__: - | def heroicon(name): return f"https://raw.githubusercontent.com/tailwindlabs/heroicons/master/src/24/outline/{name}.svg" + - | + def img_width(width): + return f"width: {width}; max-width: 100vw;" - | def hlt(string): def colorize(name, brightness=500): @@ -161,7 +164,7 @@ html: ?if item["img-width"]: style: "width: 200px; max-width: 100vw;" ?else: - style: ?f"width: {item['img-width']}; max-width: 100vw;" + style: ?img_width(item['img-width']) content: null - div: