uhppoted-db-web/views/login.ejs
2025-08-28 06:17:31 -06:00

53 lines
1.5 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body { font-family: Arial, sans-serif; background: #f4f4f4; }
.login-container {
max-width: 350px;
margin: 80px auto;
padding: 30px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-container h2 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; }
input[type="text"], input[type="password"] {
width: 100%; padding: 8px; box-sizing: border-box;
border: 1px solid #ccc; border-radius: 4px;
}
button {
width: 100%; padding: 10px;
background: #007bff; color: #fff;
border: none; border-radius: 4px;
font-size: 16px; cursor: pointer;
}
button:hover { background: #0056b3; }
.error { color: #d00; text-align: center; margin-bottom: 12px; }
</style>
</head>
<body>
<div class="login-container">
<h2>Login</h2>
<% if (typeof error !== 'undefined' && error) { %>
<div class="error"><%= error %></div>
<% } %>
<form method="POST" action="/login">
<div class="form-group">
<label for="username">Username</label>
<input id="username" name="username" type="text" required autofocus>
</div>
<div class="form-group">
<label for="password">Password</label>
<input id="password" name="password" type="password" required>
</div>
<button type="submit">Login</button>
</form>
</div>
</body>
</html>