-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.html
87 lines (78 loc) · 5.16 KB
/
register.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register - ShotStreak</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="tailwindextras.js"></script>
<link rel="stylesheet" href="main.css">
<link rel="icon" type="image/png" href="assets/favicon-48x48.png" sizes="48x48" />
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg" />
<link rel="shortcut icon" href="assets/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="Shotstreak" />
<link rel="manifest" href="assets/site.webmanifest" />
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<script src="https://unpkg.com/htmx.org"></script>
<style>
[x-cloak] {
display: none !important;
}
</style>
</head>
<body class="bg-light-gray">
<!-- Registration Form Container -->
<div class="flex items-center justify-center min-h-screen" x-data="{loading : false}">
<div class="bg-white p-8 rounded-lg shadow-lg max-w-md w-full">
<!-- Logo -->
<div class="text-center mb-6">
<img src="assets/isoLogo.svg" alt="ShotStreak Logo" class="mx-auto h-16">
<h1 class="text-2xl font-bold text-almostblack mt-4">Create an Account</h1>
</div>
<!-- Registration Form -->
<form id="registerForm" hx-post="register.php" hx-trigger="submit" hx-target="#response" hx-swap="innerHTML" @submit="loading = true" class="space-y-4" autocomplete="off">
<!-- Name Input -->
<div>
<label for="username" class="block text-sm font-medium text-gray-700">Username</label>
<input type="text" pattern="[a-zA-Z0-9]+" name="username" minlength="2" id="username" maxlength="20" class="mt-1 p-2 w-full border rounded-md focus-visible:outline-coral" required>
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700">Email:</label>
<input type="email" name="email" id="email" maxlength="200" class="mt-1 p-2 w-full border rounded-md focus-visible:outline-coral" required>
</div>
<!-- Password Input -->
<div>
<label for="password" class="block text-sm font-medium text-gray-700">Password</label>
<input type="password" name="password" id="password" minlength="5" maxlength="20" class="mt-1 p-2 w-full border rounded-md focus-visible:outline-coral" required>
</div>
<!-- Submit Button -->
<button type="submit" class="w-full md:hover:bg-coralhov bg-coral text-white py-2 rounded-md font-semibold hover:bg-coral-red-light transition-colors">Register</button>
</form>
<!-- Already have an account -->
<div class="text-center mt-4">
<p class="text-sm text-gray-600">Already have an account? <a href="login.html" class="text-coral font-semibold">Log in</a></p>
<p class="text-sm text-gray-600">Are you a coach? <a href="coachreg.html" class="text-coral font-semibold">Create a coach account</a></p>
</div>
</div>
<!-- Response Div -->
<div id="response"></div>
<div class="fixed top-1/2 " x-show="loading" x-cloak>
<svg width="40" height="40" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_qM83{animation:spinner_8HQG 1.05s infinite}.spinner_oXPr{animation-delay:.1s}.spinner_ZTLf{animation-delay:.2s}@keyframes spinner_8HQG{0%,57.14%{animation-timing-function:cubic-bezier(0.33,.66,.66,1);transform:translate(0)}28.57%{animation-timing-function:cubic-bezier(0.33,0,.66,.33);transform:translateY(-6px)}100%{transform:translate(0)}}</style><circle class="spinner_qM83" fill="#ff6f61" cx="4" cy="12" r="3"/><circle fill="#ff6f61" class="spinner_qM83 spinner_oXPr" cx="12" cy="12" r="3"/><circle fill="#ff6f61" class="spinner_qM83 spinner_ZTLf" cx="20" cy="12" r="3"/></svg>
</div>
</div>
<footer class="bg-darkslate py-8 text-white">
<div class="container mx-auto grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="footer-links flex flex-col justify-center items-center">
<a href="index.html" class="block mb-2 text-center">Home</a>
<a href="register.html" class="block mb-2 text-center">Register</a>
<a href="login.html" class="block mb-2 text-center">Login</a>
<!-- Add more links -->
</div>
<div class="text-center flex justify-center items-center">
<p class="text-xs">© 2024 ShotStreak. All rights reserved.</p>
</div>
</div>
</footer>
</body>
</html>