summaryrefslogtreecommitdiff
path: root/yarrow.cgi
diff options
context:
space:
mode:
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)