changeset 22:7b35fb1e6603

add account.html
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 30 Jul 2025 19:51:49 -0600
parents f551d19da80d
children 0c17c233c45a
files src/account.html.luan
diffstat 1 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r f551d19da80d -r 7b35fb1e6603 src/account.html.luan
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/account.html.luan	Wed Jul 30 19:51:49 2025 -0600
@@ -0,0 +1,38 @@
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local Io = require "luan:Io.luan"
+local Http = require "luan:http/Http.luan"
+local Shared = require "site:/lib/Shared.luan"
+local head = Shared.head or error()
+local header = Shared.header or error()
+
+
+return function()
+	Io.stdout = Http.response.text_writer()
+%>
+<!doctype html>
+<html lang="en">
+	<head>
+<%		head() %>
+		<script>
+			'use strict';
+			
+			function logout() {
+				document.cookie = 'user=; Max-Age=0; path=/;';
+				document.cookie = 'password=; Max-Age=0; path=/;';
+				location = '/';
+			}
+		</script>
+	</head>
+	<body>
+<%		header() %>
+		<div content>
+			<h1>Your Account</h1>
+
+			<p><a href="chats.html">Your chats</a></p>
+			<p><a href="javascript:logout()">Logout</a></p>
+		</div>
+	</body>
+</html>
+<%
+end