mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2024-12-29 00:04:35 +00:00
change Dinnerbone user; add trans flag css class
This commit is contained in:
parent
99bc149756
commit
292a8f0de7
2 changed files with 26 additions and 7 deletions
|
@ -56,6 +56,7 @@ local script = io.open("script.js"):read("a")
|
||||||
|
|
||||||
local function get_user_theme(username)
|
local function get_user_theme(username)
|
||||||
local c = ""
|
local c = ""
|
||||||
|
local js = ""
|
||||||
if username == "_jeb" then
|
if username == "_jeb" then
|
||||||
c = "html { animation: 2s jeb infinite; }"
|
c = "html { animation: 2s jeb infinite; }"
|
||||||
c = c .. "@keyframes jeb {\n"
|
c = c .. "@keyframes jeb {\n"
|
||||||
|
@ -64,13 +65,14 @@ local function get_user_theme(username)
|
||||||
end
|
end
|
||||||
c = c .. "\n}"
|
c = c .. "\n}"
|
||||||
elseif username == "Dinnerbone" then
|
elseif username == "Dinnerbone" then
|
||||||
c = "html { transform: scale(-1); bottom: 0; position: absolute; right: 0;
|
c = "html { transform: scale(-1); } "
|
||||||
width: 100%; } "
|
|
||||||
end
|
end
|
||||||
return c
|
return c, js
|
||||||
end
|
end
|
||||||
|
|
||||||
local function respond(status, title, body)
|
local function respond(status, title, body)
|
||||||
|
local themecss, themejs = get_user_theme(path and path:sub(2))
|
||||||
|
|
||||||
print(string.format("Status: %d", status))
|
print(string.format("Status: %d", status))
|
||||||
print("Content-Type: text/html")
|
print("Content-Type: text/html")
|
||||||
print("")
|
print("")
|
||||||
|
@ -98,13 +100,16 @@ local function respond(status, title, body)
|
||||||
</nav>
|
</nav>
|
||||||
]],
|
]],
|
||||||
escape(title),
|
escape(title),
|
||||||
stylesheet,
|
stylesheet, -- style.css
|
||||||
get_user_theme(path and path:sub(2)),
|
themecss, -- theme for user
|
||||||
script,
|
script, -- script.js
|
||||||
config.head_extra or ""
|
config.head_extra or ""
|
||||||
))
|
))
|
||||||
body()
|
body()
|
||||||
print("</body></html>")
|
print(string.format(
|
||||||
|
"<script>%s</script></body></html>",
|
||||||
|
themejs
|
||||||
|
))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function respond_error(message)
|
local function respond_error(message)
|
||||||
|
|
14
style.css
14
style.css
|
@ -7,6 +7,20 @@
|
||||||
--t1: hsl(var(--hue), 13%, 51%);
|
--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 {
|
body {
|
||||||
background-color: var(--b1);
|
background-color: var(--b1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue