|
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 page_header = Shared.page_header or error()
|
|
|
8 local footer = Shared.footer or error()
|
|
|
9 local password_input = Shared.password_input 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 <title>Link My Style</title>
|
|
|
20 <style>
|
|
|
21 div[right_of_page] {
|
|
|
22 background-image: url(/images/shirts.jpg);
|
|
|
23 }
|
|
|
24 div[forgot] {
|
|
|
25 text-align: center;
|
|
|
26 margin-top: 10px;
|
|
|
27 }
|
|
|
28 div[register] {
|
|
|
29 text-align: center;
|
|
|
30 margin-top: 20px;
|
|
|
31 }
|
|
|
32 </style>
|
|
|
33 </head>
|
|
|
34 <body>
|
|
|
35 <form page onsubmit="ajaxForm('/login.js',this)" action="javascript:">
|
|
|
36 <% page_header() %>
|
|
|
37 <div>
|
|
|
38 <h1>Log in</h1>
|
|
|
39 <input type=text required name=username placeholder="Username">
|
|
|
40 <div error=username></div>
|
|
|
41 <% password_input() %>
|
|
|
42 <div error=password></div>
|
|
|
43 <button type=submit big>Log in</button>
|
|
|
44 <div forgot><a href="/forgot.html">Forgot username or password?</a></div>
|
|
|
45 <div register>Don't have a Link My Style account? <a href="/register.html">Create one</a></div>
|
|
|
46 </div>
|
|
|
47 <% footer() %>
|
|
|
48 </form>
|
|
|
49 <div right_of_page></div>
|
|
|
50 </body>
|
|
|
51 </html>
|
|
|
52 <%
|
|
|
53 end
|