Spaces:
Running
Running
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Inscription - LaboConnect</title> | |
| <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💉</text></svg>"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| body { | |
| font-family: 'Poppins', sans-serif; | |
| background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%); | |
| } | |
| .btn-primary { | |
| background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%); | |
| transition: all 0.3s ease; | |
| } | |
| .btn-primary:hover { | |
| background: linear-gradient(90deg, #4338ca 0%, #6d28d9 100%); | |
| transform: scale(1.05); | |
| } | |
| </style> | |
| </head> | |
| <body class="min-h-screen flex items-center justify-center p-4"> | |
| <div class="w-full max-w-md"> | |
| <div class="bg-white rounded-2xl shadow-xl p-8"> | |
| <div class="text-center mb-8"> | |
| <div class="mx-auto w-16 h-16 rounded-full bg-indigo-100 flex items-center justify-center mb-4"> | |
| <i data-feather="user-plus" class="text-indigo-600 w-8 h-8"></i> | |
| </div> | |
| <h1 class="text-2xl font-bold text-gray-800">Créer un compte</h1> | |
| <p class="text-gray-600 mt-2">Rejoignez LaboConnect pour prendre vos rendez-vous de prise de sang</p> | |
| </div> | |
| <form id="registerForm" class="space-y-6"> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Nom complet</label> | |
| <input type="text" id="registerName" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Email</label> | |
| <input type="email" id="registerEmail" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Mot de passe</label> | |
| <input type="password" id="registerPassword" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required minlength="6"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-700 mb-2">Confirmer le mot de passe</label> | |
| <input type="password" id="confirmPassword" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-300 focus:border-transparent" required minlength="6"> | |
| </div> | |
| <button type="submit" class="w-full btn-primary text-white py-3 rounded-lg font-medium">S'inscrire</button> | |
| </form> | |
| <div class="mt-6 text-center"> | |
| <p class="text-gray-600"> | |
| Vous avez déjà un compte ? | |
| <a href="login.html" class="text-indigo-600 font-medium hover:text-indigo-800">Se connecter</a> | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| document.getElementById('registerForm').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const name = document.getElementById('registerName').value; | |
| const email = document.getElementById('registerEmail').value; | |
| const password = document.getElementById('registerPassword').value; | |
| const confirmPassword = document.getElementById('confirmPassword').value; | |
| if (password !== confirmPassword) { | |
| alert('Les mots de passe ne correspondent pas'); | |
| return; | |
| } | |
| // Mock registration - In a real app, this would send to a server | |
| const users = JSON.parse(localStorage.getItem('users')) || []; | |
| if (users.some(u => u.email === email)) { | |
| alert('Cet email est déjà utilisé'); | |
| return; | |
| } | |
| const newUser = { name, email, password }; | |
| users.push(newUser); | |
| localStorage.setItem('users', JSON.stringify(users)); | |
| localStorage.setItem('currentUser', JSON.stringify(newUser)); | |
| alert('Inscription réussie !'); | |
| window.location.href = 'dashboard.html'; | |
| }); | |
| </script> | |
| </body> | |
| </html> |