Mercurial Hosting > lang
comparison src/account.html.luan @ 22:7b35fb1e6603
add account.html
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 30 Jul 2025 19:51:49 -0600 |
parents | |
children | 87fe70201aa8 |
comparison
equal
deleted
inserted
replaced
21:f551d19da80d | 22:7b35fb1e6603 |
---|---|
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 | |
9 | |
10 return function() | |
11 Io.stdout = Http.response.text_writer() | |
12 %> | |
13 <!doctype html> | |
14 <html lang="en"> | |
15 <head> | |
16 <% head() %> | |
17 <script> | |
18 'use strict'; | |
19 | |
20 function logout() { | |
21 document.cookie = 'user=; Max-Age=0; path=/;'; | |
22 document.cookie = 'password=; Max-Age=0; path=/;'; | |
23 location = '/'; | |
24 } | |
25 </script> | |
26 </head> | |
27 <body> | |
28 <% header() %> | |
29 <div content> | |
30 <h1>Your Account</h1> | |
31 | |
32 <p><a href="chats.html">Your chats</a></p> | |
33 <p><a href="javascript:logout()">Logout</a></p> | |
34 </div> | |
35 </body> | |
36 </html> | |
37 <% | |
38 end |