Mercurial Hosting > chat
view src/manual_login.html.luan @ 44:1aa50739475a
add manual login
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Thu, 27 Feb 2025 22:50:46 -0700 |
| parents | src/login.html.luan@7ea33179592a |
| children | 8c3b56bb0c83 |
line wrap: on
line source
local Luan = require "luan:Luan.luan" local error = Luan.error local ipairs = Luan.ipairs or 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 Utils = require "site:/lib/Utils.luan" local to_list = Utils.to_list or error() return function() Io.stdout = Http.response.text_writer() %> <!doctype html> <html> <head> <% head() %> <style> input[name=email] { width: 300px; max-width: 100%; } [failed] { color: red; } </style> </head> <body> <% header() %> <div content> <h1>Password Login</h1> <form page onsubmit="ajaxForm('/manual_login.js',this)" action="javascript:"> <p> <label prompt>Your email address</label> <input type=email name=email required autofocus> </p> <p> <label prompt>Password</label> <input name=password required> </p> <p> <input type=submit> </p> <p failed></p> </form> </div> </body> </html> <% end
