diff src/register.html.luan @ 0:8f4df159f06b

start public repo
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 11 Jul 2025 20:57:49 -0600
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/register.html.luan	Fri Jul 11 20:57:49 2025 -0600
@@ -0,0 +1,51 @@
+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 page_header = Shared.page_header or error()
+local footer = Shared.footer or error()
+local password_input = Shared.password_input or error()
+
+
+return function()
+	Io.stdout = Http.response.text_writer()
+%>
+<!doctype html>
+<html lang="en">
+	<head>
+<%		head() %>
+		<title>Link My Style</title>
+		<meta name="robots" content="noindex,nofollow"/>
+		<style>
+			div[right_of_page] {
+				background-image: url(/images/model.jpg);
+			}
+			div[login] {
+				text-align: center;
+				margin-top: 20px;
+			}
+		</style>
+	</head>
+	<body>
+		<form page onsubmit="ajaxForm('/register.js',this)" action="javascript:">
+<%			page_header() %>
+			<div>
+				<h1>Create your account</h1>
+				<p>Choose your username. You can always change it later.</p>
+				<input type=text required name=username placeholder="Username">
+				<div error=username></div>
+				<input type=email required name=email placeholder="Email">
+				<div error=email></div>
+<%				password_input() %>
+				<button type=submit big>Create account</button>
+				<div login>Already registered? <a href="/login.html">Log in</a></div>
+			</div>
+<%			footer() %>
+		</form>
+		<div right_of_page></div>
+	</body>
+</html>
+<%
+end