Files
ChatBot/frontend/templates/register.html
2025-10-03 01:23:18 +02:00

153 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Register</title>
<style>
/* Use the same styling as login.html for consistency */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
height: 100vh;
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.login-container {
background: white;
max-width: 400px;
width: 100%;
padding: 40px 30px 50px;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0,0,0,0.2);
text-align: center;
transition: transform 0.3s ease;
}
.login-container:hover {
transform: translateY(-8px);
box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
h2 {
font-weight: 600;
color: #333;
margin-bottom: 30px;
font-size: 28px;
letter-spacing: 1.2px;
}
.input-group {
margin-bottom: 25px;
text-align: left;
}
label {
display: block;
margin-bottom: 8px;
color: #555;
font-weight: 600;
font-size: 14px;
}
input[type="username"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 14px 18px;
font-size: 16px;
border-radius: 12px;
border: 2px solid #ddd;
transition: 0.3s border-color ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
input[type="username"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
border-color: #2575fc;
outline: none;
box-shadow: 0 0 12px rgba(37, 117, 252, 0.5);
}
button {
width: 100%;
padding: 16px 0;
margin-top: 10px;
background-color: #2575fc;
border: none;
border-radius: 14px;
color: white;
font-size: 18px;
font-weight: 700;
letter-spacing: 1px;
cursor: pointer;
box-shadow: 0 10px 20px rgba(37, 117, 252, 0.4);
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
button:hover {
background-color: #1859d6;
box-shadow: 0 15px 25px rgba(24, 89, 214, 0.6);
}
.error-message {
margin-top: 20px;
color: #ff4d4f;
font-weight: 600;
font-size: 15px;
text-align: center;
background: #ffe6e6;
padding: 10px 15px;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(255,77,79,0.3);
display: none;
}
</style>
</head>
<body>
<div class="login-container">
<h2>Create an Account</h2>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="error-message" style="display:block;">
{% for category, message in messages %}
{{ message }}
{% endfor %}
</div>
{% endif %}
{% endwith %}
<form method="POST" action="{{ url_for('register') }}">
<div class="input-group">
<label for="username">Username</label>
<input type="username" id="username" name="username" placeholder="username" required />
</div>
<div class="input-group">
<label for="email">Email Address</label>
<input type="email" id="email" name="email" placeholder="you@example.com" required />
</div>
<div class="input-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Create a password" required />
</div>
<div class="input-group">
<label for="confirm_password">Confirm Password</label>
<input type="password" id="confirm_password" name="confirm_password" placeholder="Confirm your password" required />
</div>
<button type="submit">Register</button>
<p style="margin-top: 20px; font-size: 14px;">Already have an account? <a href="{{ url_for('login') }}">Log in here</a>.</p>
</form>
</div>
</body>
</html>