From 3425c3c435a000b14103a0055fd913ccb855b734 Mon Sep 17 00:00:00 2001 From: sanine Date: Mon, 18 Sep 2023 05:11:05 +0000 Subject: implement basic ui --- yarrow.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'yarrow.cgi') diff --git a/yarrow.cgi b/yarrow.cgi index 7543f42..14dba58 100755 --- a/yarrow.cgi +++ b/yarrow.cgi @@ -21,9 +21,12 @@ if not query.statistics then error('no statistics submitted!') end local statistics = json.decode(b64.decode(query.statistics)) +local theme = (query.theme and json.decode(b64.decode(query.theme))) or { + bg='white', text='black', flair='darkred', +} -- create & respond with image -local svg = draw.draw(statistics) +local svg = draw.draw(statistics, theme) print('Content-type: image/svg+xml\n') print(svg) -- cgit v1.2.1