Files
tutor-tool/app/templates/register.html

62 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register for Tutortool</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/output.css') }}">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
</head>
<body class="flex items-center justify-center min-h-screen bg-background">
<div class="bg-gray-800 p-8 rounded-lg shadow-lg max-w-md w-full border border-gray-700">
<div class="text-center mb-6">
<h1 class="text-3xl font-bold text-white mb-2">Create an Account</h1>
<p class="text-muted text-sm">Choose a username to get started.</p>
</div>
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="space-y-3 mb-6">
{% for category, message in messages %}
{% set alert_class = 'bg-red-900 border-red-400 text-red-100' if category == 'error' else 'bg-green-900 border-green-400 text-green-100' %}
<div class="p-3 border rounded-lg {{ alert_class }}" role="alert">
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<form action="/register" method="POST" class="space-y-6">
<!-- Flask-WTF form fields will be injected here -->
<div class="mb-4">
<label for="username" class="block text-sm font-medium text-gray-400 mb-2">Username</label>
<input type="text" id="username" name="username" placeholder="Your unique username" required class="w-full px-4 py-2 bg-gray-700 border border-gray-600 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div class="bg-gray-700 p-4 rounded-lg border border-gray-600 space-y-3">
<h3 class="text-sm font-semibold text-gray-200">Important Information</h3>
<p class="text-xs text-gray-400">
Your username is tied to the slides using a browser cookie. If you clear your cookies, you can regain access to your slides by logging in with the same username.
</p>
<div class="flex items-center">
<input type="checkbox" id="acknowledge" name="acknowledge" required class="h-4 w-4 text-blue-500 rounded border-gray-300 focus:ring-blue-500">
<label for="acknowledge" class="ml-2 block text-sm text-gray-400">
I understand and agree
</label>
</div>
</div>
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition-colors">
Register
</button>
</form>
<p class="text-center mt-4 text-sm text-text">
Already have an account? <a href="/set_token" class="text-blue-400 hover:underline">Log In</a>
</p>
</div>
</body>
</html>