some type of authentication for the site

This commit is contained in:
Reid 2023-09-21 18:43:41 -07:00
parent b3451a641e
commit cdaf5febb7
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8
13 changed files with 318 additions and 7 deletions

55
templates/login.html.hbs Normal file
View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/style.css" />
<title>Login</title>
<style>
body {
min-height: 100vh;
text-align: center;
width: 100%;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
form {
display: flex;
flex-direction: column;
gap: 0.5em;
align-items: center;
justify-content: center;
max-width: 800px;
height: 100%;
padding: 1em;
}
</style>
</head>
<body>
<form method="post">
<img src="/favicon.png" width="64" height="auto">
<br>
<label for="username">Username</label>
<input type="text" id="username" name="username" minlength="3" maxlength="20" required />
<label for="password">Password</label>
<input type="password" id="password" name="password" minlength="6" required />
{{#if error}}
<div class="error">{{error}}</div>
{{/if}}
{{#if success}}
<div class="success">{{success}}</div>
{{/if}}
<input type="submit" value="Login" class="fancy-button" />
</form>
</body>
</html>

View file

@ -13,7 +13,7 @@
<h1>Level Reupload</h1>
{{#if error}}
<div>Error while uploading: {{ error }}</div><br />
<div class="error">Error while uploading: {{ error }}</div><br />
{{/if}}
{{#if level_id}}
<div>Uploaded successfully! Level ID: <b>{{ level_id }}</b></div><br />