|
|
@ -1,7 +1,34 @@ |
|
|
|
local etlua = require"etlua" |
|
|
|
local form = etlua.compile[[ |
|
|
|
<!DOCTYPE html> |
|
|
|
<html> |
|
|
|
<head> |
|
|
|
<title>Yokoka’s Quest Character Profile Creator</title> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<% if data then %><%= data %><% end %> |
|
|
|
<form action="/cgi/yqtemplate" method="post"> |
|
|
|
<label for="name">Character name</label> |
|
|
|
<input type="text" id="name" /> |
|
|
|
<input type="submit" value="Generate"> |
|
|
|
</form> |
|
|
|
<hr /> |
|
|
|
Based on the character profiles in the webcomic <a |
|
|
|
href=https://yokokasquest.com>Yokoka’s Quest</a> by Chris Hyacinth R. Assets |
|
|
|
shared by the author on the <a |
|
|
|
href=https://forums.cisumchronicles.com/>webcomic’s forums</a>. |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
]] |
|
|
|
|
|
|
|
return { |
|
|
|
desc = "Creates Yokoka’s quest-style personal status page", |
|
|
|
run = function(fcgi) |
|
|
|
fcgi.print("Content-Type: text/plain; charset=utf-8\r\n\r\n") |
|
|
|
fcgi.print("Hello from application `YQTemplate'") |
|
|
|
fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n") |
|
|
|
local data = nil |
|
|
|
if fcgi.getenv("REQUEST_METHOD") == "POST" |
|
|
|
data = fcgi.post() |
|
|
|
end |
|
|
|
form({data = data}) |
|
|
|
end |
|
|
|
} |