summaryrefslogtreecommitdiff
path: root/yarrow.cgi
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-09-18 05:11:05 +0000
committersanine <sanine.not@pm.me>2023-09-18 05:11:05 +0000
commit3425c3c435a000b14103a0055fd913ccb855b734 (patch)
tree2efbb0599104d3794f5c0604d71ac16bf97368d2 /yarrow.cgi
parentbfcc2e759807a692d8e0353e3bbecd109175032b (diff)
implement basic ui
Diffstat (limited to 'yarrow.cgi')
-rwxr-xr-xyarrow.cgi5
1 files changed, 4 insertions, 1 deletions
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)