work on auth routes and templates
This commit is contained in:
parent
872426df71
commit
574cc8c588
6
fs/templates/auth/register.html
Normal file
6
fs/templates/auth/register.html
Normal 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
12
fs/templates/base.html
Normal 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>
|
10
public/css/style.css
Normal file
10
public/css/style.css
Normal file
@ -0,0 +1,10 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
background-color: #333;
|
||||
}
|
0
routes/auth/login/get.lua
Normal file
0
routes/auth/login/get.lua
Normal file
0
routes/auth/login/post.lua
Normal file
0
routes/auth/login/post.lua
Normal file
6
routes/auth/register/get.lua
Normal file
6
routes/auth/register/get.lua
Normal 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
|
||||
}))
|
0
routes/auth/register/post.lua
Normal file
0
routes/auth/register/post.lua
Normal file
Loading…
x
Reference in New Issue
Block a user