You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
962 B

  1. local etlua = require"etlua"
  2. local form = etlua.compile[[
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>Yokokas Quest Character Profile Creator</title>
  7. </head>
  8. <body>
  9. <% if data then %><%= data %><% end %>
  10. <form action="/cgi/yqtemplate" method="post">
  11. <label for="name">Character name</label>
  12. <input type="text" id="name" />
  13. <input type="submit" value="Generate">
  14. </form>
  15. <hr />
  16. Based on the character profiles in the webcomic <a
  17. href=https://yokokasquest.com>Yokokas Quest</a> by Chris Hyacinth R. Assets
  18. shared by the author on the <a
  19. href=https://forums.cisumchronicles.com/>webcomics forums</a>.
  20. </body>
  21. </html>
  22. ]]
  23. return {
  24. desc = "Creates Yokoka’s quest-style personal status page",
  25. run = function(fcgi)
  26. fcgi.print("Content-Type: text/html; charset=utf-8\r\n\r\n")
  27. local data = nil
  28. if fcgi.getenv("REQUEST_METHOD") == "POST"
  29. data = fcgi.post()
  30. end
  31. form({data = data})
  32. end
  33. }