Mercurial Hosting > disearch
view src/add_server.html.luan @ 11:62dd23f0b549
start add server
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 29 Oct 2023 22:39:31 -0600 |
parents | src/index.html.luan@43814e9f5802 |
children | 3e2cb946d511 |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local Html = require "luan:Html.luan" local html_encode = Html.encode or error() local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local Shared = require "site:/lib/Shared.luan" local head = Shared.head or error() local header = Shared.header or error() local footer = Shared.footer or error() return function() local parameters = Http.request.parameters local id = parameters.id or error() local name = parameters.name or error() local icon = parameters.icon Io.stdout = Http.response.text_writer() %> <!doctype html> <html> <head> <% head() %> <title>Disearch</title> </head> <body> <% header() %> <h1>Add server</h1> <p><%=html_encode(name)%></p> <% if icon ~= nil then %> <p><img src="https://cdn.discordapp.com/icons/<%=id%>/<%=icon%>.png"></p> <% end %> <% footer() %> </body> </html> <% end