diff options
Diffstat (limited to 'yarrow-ui.cgi')
-rwxr-xr-x | yarrow-ui.cgi | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/yarrow-ui.cgi b/yarrow-ui.cgi new file mode 100755 index 0000000..37c2f87 --- /dev/null +++ b/yarrow-ui.cgi @@ -0,0 +1,25 @@ +#!/usr/bin/env lua5.1 + +local marigold = require 'marigold-cgi.marigold' +local h = marigold.h +local b64 = require '3rdparty.base64' +local json = require '3rdparty.json' + + +local img = h('img', { style='color: white', src='https://sanine.net/utils/yarrow/yarrow.cgi?statistics=eyJzdHIiOjE3LCJocCI6IjM5ICg2ZDggKyAxMikiLCJ3aXMiOjEzLCJhYyI6IjE3IChuYXR1cmFsIGFybW9yLCBzaGllbGQpIiwiY29uIjoxNSwiaW50IjoxMiwic3BlZWQiOiIzMCBmdC4iLCJhY3Rpb25zIjpbeyJuYW1lIjoiV2FyaGFtbWVyIiwidmFsdWUiOiIqTWVsZWUgV2VhcG9uIEF0dGFjazoqICs1IHRvIGhpdCwgcmVhY2ggNSBmdC4sIG9uZSB0YXJnZXQuICpIaXQ6KiA3ICgxZDggKyAzKSBibHVkZ2VvbmluZyBkYW1hZ2Ugb3IgOCAoMWQxMCArIDMpIGJsdWRnZW9uaW5nIGRhbWFnZSBpZiB1c2VkIHdpdGggdHdvIGhhbmRzIHRvIG1ha2UgYSBtZWxlZSBhdHRhY2ssIHBsdXMgMyAoMWQ2KSBmaXJlIGRhbWFnZS4ifV0sInNpemUiOiJtZWRpdW0iLCJ0eXBlIjoiZWxlbWVudGFsIiwiY2hhIjoxMCwibGVnZW5kYXJ5Ijp7ImRlc2NyaXB0aW9uIjoiVGhlIGRlYXRoIHR5cmFudCBjYW4gdGFrZSAzIGxlZ2VuZGFyeSBhY3Rpb25zLCB1c2luZyB0aGUgRXllIFJheSBvcHRpb24gYmVsb3cuIEl0IGNhbiB0YWtlIG9ubHkgb25lIGxlZ2VuZGFyeSBhY3Rpb24gYXQgYSB0aW1lIGFuZCBv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c2l2ZSBQZXJjZXB0aW9uIDExIiwiZGV4IjoxMiwiY3IiOiIyICg0NTAgWFApIn0=' }) + + +local head = h('head', { + h('meta', { charset='utf-8' }), + h('meta', { name='viewport', content='width=device-width, initial-scale=1' }), + h('title', 'yarrow config'), + h('link', { rel='stylesheet', href='style.css' }), +}) + +local body = h('body', { + img, +}) + + +print('Content-type: text/html\n') +print(marigold.html(h('html', { head, body }))) |