|
0
|
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()
|
|
117
|
8 local hidden_with = Shared.hidden_with or error()
|
|
|
9 local add_with = Shared.add_with or error()
|
|
0
|
10
|
|
|
11
|
|
|
12 return function()
|
|
|
13 Io.stdout = Http.response.text_writer()
|
|
|
14 %>
|
|
|
15 <!doctype html>
|
|
94
|
16 <html lang="en">
|
|
0
|
17 <head>
|
|
|
18 <% head() %>
|
|
40
|
19 <style>
|
|
|
20 input[name=email] {
|
|
|
21 width: 300px;
|
|
|
22 max-width: 100%;
|
|
|
23 }
|
|
|
24 </style>
|
|
0
|
25 </head>
|
|
|
26 <body>
|
|
|
27 <% header() %>
|
|
|
28 <div content>
|
|
117
|
29 <h1>Register / Get Password</h1>
|
|
3
|
30 <p>A link to login will be emailed to you.</p>
|
|
117
|
31 <form page onsubmit="ajaxForm('/register.js',this)" action="javascript:">
|
|
|
32 <% hidden_with() %>
|
|
3
|
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>
|
|
117
|
41 <p><a href="<%= add_with("login.html") %>">Login</a></p>
|
|
51
|
42 <p><a href="about.html">About Luan Chat</a></p>
|
|
0
|
43 </div>
|
|
|
44 </body>
|
|
|
45 </html>
|
|
|
46 <%
|
|
|
47 end
|