diff options
author | Riley L. <riley@e926.de> | 2024-11-04 11:59:53 +0100 |
---|---|---|
committer | Riley L. <riley@e926.de> | 2024-11-04 11:59:53 +0100 |
commit | 292a8f0de7838c6070e61d6e83bad7629045aaef (patch) | |
tree | c09d8573deee80db5c4e1d28e403d3034ca6192e | |
parent | 99bc1497563ded4f080283f70cf07fb40aa5f9d1 (diff) | |
download | abrechenbarkeit-292a8f0de7838c6070e61d6e83bad7629045aaef.tar abrechenbarkeit-292a8f0de7838c6070e61d6e83bad7629045aaef.tar.bz2 abrechenbarkeit-292a8f0de7838c6070e61d6e83bad7629045aaef.tar.zst |
change Dinnerbone user; add trans flag css class
-rwxr-xr-x | abrechenbarkeit.lua | 19 | ||||
-rw-r--r-- | style.css | 14 |
2 files changed, 26 insertions, 7 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index 28bf1b8..6a1543e 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -56,6 +56,7 @@ local script = io.open("script.js"):read("a") local function get_user_theme(username) local c = "" + local js = "" if username == "_jeb" then c = "html { animation: 2s jeb infinite; }" c = c .. "@keyframes jeb {\n" @@ -64,13 +65,14 @@ local function get_user_theme(username) end c = c .. "\n}" elseif username == "Dinnerbone" then - c = "html { transform: scale(-1); bottom: 0; position: absolute; right: 0; - width: 100%; } " + c = "html { transform: scale(-1); } " end - return c + return c, js end local function respond(status, title, body) + local themecss, themejs = get_user_theme(path and path:sub(2)) + print(string.format("Status: %d", status)) print("Content-Type: text/html") print("") @@ -98,13 +100,16 @@ local function respond(status, title, body) </nav> ]], escape(title), - stylesheet, - get_user_theme(path and path:sub(2)), - script, + stylesheet, -- style.css + themecss, -- theme for user + script, -- script.js config.head_extra or "" )) body() - print("</body></html>") + print(string.format( + "<script>%s</script></body></html>", + themejs + )) end local function respond_error(message) @@ -7,6 +7,20 @@ --t1: hsl(var(--hue), 13%, 51%); } +.trans { + background: linear-gradient( + #60d0fa50 0%, + #60d0fa50 19%, + #f5acba50 20%, + #f5acba50 39%, + #FFFFFF50 40%, + #FFFFFF50 59%, + #f5acba50 60%, + #f5acba50 79%, + #60d0fa50 80% + ); +} + body { background-color: var(--b1); } |