Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Login - DeliveryPal</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#FF6B35', | |
| secondary: '#6E0D88', | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://accounts.google.com/gsi/client" async defer></script> | |
| <style> | |
| .auth-bg { | |
| background-image: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('http://static.photos/technology/1200x630/12'); | |
| } | |
| .google-btn { | |
| transition: all 0.3s ease; | |
| } | |
| .google-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| </style> | |
| </head> | |
| <body class="font-sans bg-gray-50"> | |
| <!-- Navigation --> | |
| <nav class="bg-white shadow-sm"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between h-16"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 flex items-center"> | |
| <i data-feather="truck" class="text-primary h-8 w-8"></i> | |
| <span class="ml-2 text-xl font-bold text-primary">DeliveryPal</span> | |
| </div> | |
| </div> | |
| <div class="flex items-center"> | |
| <a href="register.html" class="text-gray-700 hover:text-primary px-3 py-2 text-sm font-medium">Don't have an account? Register</a> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Main Content --> | |
| <div class="min-h-screen flex items-center justify-center auth-bg bg-cover bg-center"> | |
| <div class="max-w-md w-full bg-white rounded-lg shadow-md overflow-hidden"> | |
| <div class="p-8"> | |
| <div class="text-center mb-8"> | |
| <h2 class="text-3xl font-bold text-gray-900">Welcome Back</h2> | |
| <p class="text-gray-600 mt-2">Sign in to access your account</p> | |
| </div> | |
| <!-- Google Sign-In --> | |
| <div class="mb-6"> | |
| <button class="google-btn w-full flex items-center justify-center border border-gray-300 rounded-md py-2 px-4 text-gray-700 hover:border-primary hover:text-primary transition"> | |
| <img src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" alt="Google logo" class="h-5 w-5 mr-2"> | |
| <span>Continue with Google</span> | |
| </button> | |
| </div> | |
| <div class="flex items-center my-6"> | |
| <div class="flex-grow border-t border-gray-300"></div> | |
| <span class="mx-4 text-gray-500">or</span> | |
| <div class="flex-grow border-t border-gray-300"></div> | |
| </div> | |
| <!-- Login Form --> | |
| <form class="space-y-6" id="loginForm"> | |
| <div> | |
| <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email Address</label> | |
| <input type="email" id="email" name="email" required class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label> | |
| <input type="password" id="password" name="password" required class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="remember" name="remember" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded"> | |
| <label for="remember" class="ml-2 block text-sm text-gray-700"> | |
| Remember me | |
| </label> | |
| </div> | |
| <div> | |
| <a href="#" class="text-sm text-primary hover:underline">Forgot password?</a> | |
| </div> | |
| </div> | |
| <div> | |
| <button type="submit" class="w-full bg-primary text-white py-2 px-4 rounded-md hover:bg-opacity-90 transition focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2"> | |
| Sign In | |
| </button> | |
| </div> | |
| </form> | |
| <div class="mt-6 text-center"> | |
| <p class="text-sm text-gray-600"> | |
| Don't have an account? <a href="register.html" class="text-primary font-medium hover:underline">Register</a> | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Handle form submission | |
| document.getElementById('loginForm').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Get form data | |
| const formData = new FormData(this); | |
| const credentials = { | |
| email: formData.get('email'), | |
| password: formData.get('password'), | |
| remember: formData.get('remember') | |
| }; | |
| // Here you would typically send the data to your backend | |
| console.log('Login credentials:', credentials); | |
| // For demonstration, show success message and redirect | |
| alert('Login successful! Redirecting to dashboard...'); | |
| window.location.href = 'index.html'; | |
| }); | |
| </script> | |
| </body> | |
| </html> |