communitypulse-hub / register.html
vanrowin's picture
complete all codes including user registration, manage finances, member management, generate reports and community settings
743a488 verified
Raw
History Blame Contribute Delete
5.78 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register | CommunityPulse Hub</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<main class="flex-grow flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
<div class="w-full max-w-md space-y-8">
<div class="text-center">
<i data-feather="user-plus" class="mx-auto h-12 w-12 text-primary-500"></i>
<h2 class="mt-6 text-3xl font-extrabold text-gray-900">Create your account</h2>
<p class="mt-2 text-sm text-gray-600">
Or <a href="/login.html" class="font-medium text-primary-500 hover:text-primary-600">login to your account</a>
</p>
</div>
<form class="mt-8 space-y-6" id="registerForm">
<div class="rounded-md shadow-sm space-y-4">
<div>
<label for="fullname" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
<input id="fullname" name="fullname" type="text" required
class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary-500 focus:border-primary-500 focus:z-10 sm:text-sm"
placeholder="John Doe">
</div>
<div>
<label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email address</label>
<input id="email" name="email" type="email" required
class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary-500 focus:border-primary-500 focus:z-10 sm:text-sm"
placeholder="Email address">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input id="password" name="password" type="password" required
class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary-500 focus:border-primary-500 focus:z-10 sm:text-sm"
placeholder="Password">
</div>
<div>
<label for="confirmPassword" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
<input id="confirmPassword" name="confirmPassword" type="password" required
class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary-500 focus:border-primary-500 focus:z-10 sm:text-sm"
placeholder="Confirm Password">
</div>
</div>
<div class="flex items-center">
<input id="terms" name="terms" type="checkbox" required
class="h-4 w-4 text-primary-500 focus:ring-primary-500 border-gray-300 rounded">
<label for="terms" class="ml-2 block text-sm text-gray-900">
I agree to the <a href="/terms.html" class="text-primary-500 hover:text-primary-600">Terms of Service</a> and <a href="/privacy.html" class="text-primary-500 hover:text-primary-600">Privacy Policy</a>
</label>
</div>
<div>
<button type="submit" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary-500 hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 transition duration-300">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<i data-feather="user-plus" class="h-5 w-5 text-primary-200 group-hover:text-primary-100"></i>
</span>
Register
</button>
</div>
</form>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
document.getElementById('registerForm').addEventListener('submit', function(e) {
e.preventDefault();
const password = document.getElementById('password').value;
const confirmPassword = document.getElementById('confirmPassword').value;
if (password !== confirmPassword) {
alert('Passwords do not match');
return;
}
// In a real app, you would send to server
localStorage.setItem('authToken', 'simulated-token');
localStorage.setItem('userRole', 'user');
window.location.href = '/user-dashboard.html';
});
feather.replace();
</script>
</body>
</html>