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()
|
4
|
8 local User = require "site:/lib/User.luan"
|
|
9 local current_user = User.current or error()
|
0
|
10
|
|
11
|
|
12 return function()
|
4
|
13 local user = current_user()
|
0
|
14 Io.stdout = Http.response.text_writer()
|
|
15 %>
|
|
16 <!doctype html>
|
|
17 <html lang="en">
|
|
18 <head>
|
|
19 <% head() %>
|
|
20 </head>
|
|
21 <body>
|
|
22 <% header() %>
|
|
23 <div content>
|
|
24 <h1>Lang</h1>
|
15
|
25 <% if user == nil then %>
|
|
26 <p><a href="login.html">Register / Login</a> to use this.</p>
|
|
27 <% else %>
|
|
28 <p><a href="list.html">See your chats</a></p>
|
4
|
29 <% end %>
|
15
|
30 <p>More later...</p>
|
0
|
31 </div>
|
|
32 </body>
|
|
33 </html>
|
|
34 <%
|
|
35 end
|