comparison src/register.html.luan @ 117:e2deb5236f26

better login
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 04 Dec 2025 21:43:47 -0700
parents src/login.html.luan@8c3b56bb0c83
children
comparison
equal deleted inserted replaced
116:98b2dc732ca0 117:e2deb5236f26
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local Io = require "luan:Io.luan"
4 local Http = require "luan:http/Http.luan"
5 local Shared = require "site:/lib/Shared.luan"
6 local head = Shared.head or error()
7 local header = Shared.header or error()
8 local hidden_with = Shared.hidden_with or error()
9 local add_with = Shared.add_with or error()
10
11
12 return function()
13 Io.stdout = Http.response.text_writer()
14 %>
15 <!doctype html>
16 <html lang="en">
17 <head>
18 <% head() %>
19 <style>
20 input[name=email] {
21 width: 300px;
22 max-width: 100%;
23 }
24 </style>
25 </head>
26 <body>
27 <% header() %>
28 <div content>
29 <h1>Register / Get Password</h1>
30 <p>A link to login will be emailed to you.</p>
31 <form page onsubmit="ajaxForm('/register.js',this)" action="javascript:">
32 <% hidden_with() %>
33 <p>
34 <label prompt>Your email address</label>
35 <input type=email name=email required autofocus>
36 </p>
37 <p>
38 <input type=submit>
39 </p>
40 </form>
41 <p><a href="<%= add_with("login.html") %>">Login</a></p>
42 <p><a href="about.html">About Luan Chat</a></p>
43 </div>
44 </body>
45 </html>
46 <%
47 end