implemented basis of login, missing database connection.

This commit is contained in:
2026-03-04 22:16:50 +01:00
parent 35c93a8c10
commit cf4a611231
11 changed files with 170 additions and 6 deletions
+41
View File
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<style>
h1 {
color: green;
}
.error {
color: red;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="/login">Login</a></li>
<li><a href="/register">Create account</a></li>
</ul>
</nav>
<h1>Login to your account</h1>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form action="/login" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button type="submit">Login</button>
</form>
</body>
</html>
+41
View File
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<style>
h1 {
color: green;
}
.error {
color: red;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="/login">Login</a></li>
<li><a href="/register">Create account</a></li>
</ul>
</nav>
<h1>Create an account</h1>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
<form action="/register" method="post">
<label for="username">Username:</label>
<input type="text" name="username" required />
<label for="password">Password:</label>
<input type="password" name="password" required />
<button type="submit">Sign Up</button>
</form>
</body>
</html>