91 lines
3.0 KiB
HTML
91 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sk">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>Registrácia</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
</head>
|
|
<body class="min-h-screen bg-gray-100 flex items-center justify-center p-4">
|
|
|
|
<div class="w-full max-w-sm bg-white rounded-xl shadow-lg p-8">
|
|
|
|
<h1 class="text-3xl font-bold text-center text-gray-800 mb-8">
|
|
Registrácia
|
|
</h1>
|
|
|
|
<form id="registerForm" action="/register" method="POST" class="space-y-6">
|
|
<div>
|
|
<label for="meno" class="block text-sm font-medium text-gray-700 mb-1">
|
|
Meno / používateľ
|
|
</label>
|
|
<input
|
|
type="text"
|
|
id="meno"
|
|
name="username"
|
|
required
|
|
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-orange-400"
|
|
placeholder="Zadaj svoje meno"
|
|
/>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="heslo" class="block text-sm font-medium text-gray-700 mb-1">
|
|
Heslo
|
|
</label>
|
|
<input
|
|
type="password"
|
|
id="heslo"
|
|
name="password"
|
|
required
|
|
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-orange-400"
|
|
placeholder="••••••••"
|
|
/>
|
|
</div>
|
|
|
|
<div>
|
|
<label for="heslo2" class="block text-sm font-medium text-gray-700 mb-1">
|
|
Heslo znova
|
|
</label>
|
|
<input
|
|
type="password"
|
|
id="heslo2"
|
|
name="password2"
|
|
required
|
|
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-400 focus:border-orange-400"
|
|
placeholder="Potvrď heslo"
|
|
/>
|
|
</div>
|
|
|
|
<button
|
|
type="submit"
|
|
class="w-full bg-orange-500 hover:bg-orange-600 text-white font-medium py-3 rounded-lg transition duration-200"
|
|
>
|
|
Vytvoriť účet
|
|
</button>
|
|
</form>
|
|
|
|
<div class="text-center mt-6 text-sm text-gray-600">
|
|
Už máš účet?
|
|
<a href="/login.html" class="text-orange-600 hover:underline font-medium">
|
|
Prihlás sa
|
|
</a>
|
|
</div>
|
|
|
|
<p id="error" class="hidden mt-4 text-sm text-red-700 bg-red-50 border border-red-200 rounded-lg px-4 py-3 text-center"></p>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
const params = new URLSearchParams(window.location.search);
|
|
const error = params.get('error');
|
|
const errorBox = document.getElementById('error');
|
|
|
|
if (error) {
|
|
errorBox.textContent = error;
|
|
errorBox.classList.remove('hidden');
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |