Compare commits
No commits in common. "main" and "main" have entirely different histories.
2 changed files with 3 additions and 18 deletions
|
|
@ -3,9 +3,4 @@ jobs:
|
|||
deploy:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: |
|
||||
echo "${{secrets.SERVER_SSHKEY}}" > ../server_key &&
|
||||
chmod 700 ../server_key &&
|
||||
echo "${{secrets.SERVER_SSHKEYSCAN}}" > ../known_hosts &&
|
||||
scp -i ../server_key -o UserKnownHostsFile=../known_hosts -r lapis runner@teabucket.eu:/etc/docker/container/cups-webring
|
||||
- run: echo All Good
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ local config = require("lapis.config").get()
|
|||
|
||||
members = {{"fynn","https://fynngodau.de"},
|
||||
{"anton","https://anton.ehrmanntraut.de"},
|
||||
{"max","https://aaahhh.de"},
|
||||
{"theresa","https://treimer.dev"},
|
||||
{"never","https://nevereverever.de"}}
|
||||
{"max","https://aaahhh.de"}}
|
||||
members[#members+1] = members[1]
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
|
@ -21,7 +19,7 @@ app:get("/embed", function(self)
|
|||
if from == nil then
|
||||
return {"cups webring embed needs from defined (.../embed?from=me)"}
|
||||
end
|
||||
return string.format('<div style="display:flex; flex-direction:row; align-items:center;"><a href="%s/prev?from=%s" target="_parent"><img alt="Previous" src="%s/static/arrow_left.svg" width=50 height=50/></a><a href="%s" target="_parent"><img alt="CUPS" src="%s/static/logo_cut.svg" width=200 height=100/></a><a href="%s/next?from=%s" target="_parent"><img alt="Next" src="%s/static/arrow_right.svg" width=50 height=50/></a></div>', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"}
|
||||
return string.format('<div style="display:flex; flex-direction:row; align-items:center;"><a href="%s/prev?from=%s" target="_parent"><img src="%s/static/arrow_left.svg" width=50 height=50/></a><a href="%s"><img src="%s/static/logo_cut.svg" width=200 height=100/></a><a href="%s/next?from=%s" target="_parent"><img src="%s/static/arrow_right.svg" width=50 height=50/></a></div>', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"}
|
||||
end)
|
||||
|
||||
app:get("/random", function(self)
|
||||
|
|
@ -41,10 +39,6 @@ app:get("/next", function(self)
|
|||
found = true
|
||||
end
|
||||
end
|
||||
if "cups" == self.params.from then
|
||||
rand = math.random(1,#members-1)
|
||||
return {redirect_to=members[rand][2]}
|
||||
end
|
||||
return {redirect_to="/"}
|
||||
end)
|
||||
|
||||
|
|
@ -61,10 +55,6 @@ app:get("/prev", function(self)
|
|||
found = true
|
||||
end
|
||||
end
|
||||
if "cups" == self.params.from then
|
||||
rand = math.random(1,#members-1)
|
||||
return {redirect_to=members[rand][2]}
|
||||
end
|
||||
return {redirect_to="/"}
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue