work on auth routes and templates

This commit is contained in:
Sky Johnson 2025-05-23 22:51:51 -05:00
parent 872426df71
commit 574cc8c588
8 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<form method="post">
<input type="text" name="username" placeholder="Username">
<input type="email" name="email" placeholder="Email">
<input type="password" name="password">
<button type="submit">Register</button>
</form>

12
fs/templates/base.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }} - Dragon Knight</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
{{{ content }}}
</body>
</html>

BIN
moonshark

Binary file not shown.

10
public/css/style.css Normal file
View File

@ -0,0 +1,10 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
color: white;
background-color: #333;
}

View File

View File

View File

@ -0,0 +1,6 @@
local base_template = fs.read("templates/base.html")
local login_form = fs.read("templates/auth/register.html")
return send.html(render(base_template, {
title = "Register",
content = login_form
}))

View File