diff options
author | metamuffin <metamuffin@disroot.org> | 2024-11-03 18:38:21 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-11-03 18:38:21 +0100 |
commit | d69402120b4e8489ad222d63d01d08d62d1e49ef (patch) | |
tree | a016e8f4a4ed7e30aaa671cbde48cc3639cefdc5 /abrechenbarkeit.lua | |
parent | 4c6601a232f7b375591f9469385146d08b0b1754 (diff) | |
download | abrechenbarkeit-d69402120b4e8489ad222d63d01d08d62d1e49ef.tar abrechenbarkeit-d69402120b4e8489ad222d63d01d08d62d1e49ef.tar.bz2 abrechenbarkeit-d69402120b4e8489ad222d63d01d08d62d1e49ef.tar.zst |
unignore script
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-x | abrechenbarkeit.lua | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index 68974a4..311cd1c 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -51,30 +51,11 @@ local path = os.getenv("PATH_INFO") local method = os.getenv("REQUEST_METHOD") local query = parse_query(os.getenv("QUERY_STRING")) -local stylesheet = io.open("a.css"):read("a") --- local stylesheet = [[ --- /* body { background-color: #161616; } --- h1, h2, h3, h4, h5, h6, p, label, a { color: #e2e2e2; } */ --- .amount-presets form { display: inline-block; width: 60px } --- .amount-pos { color: green; } --- .amount-neg { color: red; } --- nav h2 { display: inline-block } --- .notif { padding: 0.5em; margin: 0.5em; background-color: #ddd; } --- .notif.error { background-color: #faa; } --- .notif p { margin: 5px; } --- form.box { border: 2px solid grey; padding: 0.5em; margin: 0.5em; display: inline-block; } --- form h3 { margin: 5px; } --- ]] +local stylesheet = io.open("style.css"):read("a") +local script = io.open("script.js"):read("a") local script = [[ - document.addEventListener("keypress", ev => { - if (!(document.activeElement instanceof HTMLInputElement)) { - if (ev.code.startsWith("Digit")) - document.forms.buy_product.product.value += ev.code.substring(5) - if (ev.code == "Enter") - document.forms.buy_product.submit() - } - }) + ]] local function respond(status, title, body) |