Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Login - ClipsCompass</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#3B82F6', | |
| secondary: '#1E40AF', | |
| accent: '#10B981' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex items-center justify-center"> | |
| <div class="max-w-md w-full space-y-8"> | |
| <div> | |
| <div class="flex justify-center"> | |
| <i data-feather="compass" class="h-12 w-12 text-primary"></i> | |
| </div> | |
| <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900"> | |
| Sign in to your account | |
| </h2> | |
| <p class="mt-2 text-center text-sm text-gray-600"> | |
| Or | |
| <a href="/register" class="font-medium text-primary hover:text-secondary"> | |
| create a new account | |
| </a> | |
| </p> | |
| </div> | |
| <form class="mt-8 space-y-6" action="/api/login" method="POST"> | |
| <div class="rounded-md shadow-sm -space-y-px"> | |
| <div> | |
| <label for="email" class="sr-only">Email address</label> | |
| <input id="email" name="email" type="email" autocomplete="email" required | |
| class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" | |
| placeholder="Email address"> | |
| </div> | |
| <div> | |
| <label for="password" class="sr-only">Password</label> | |
| <input id="password" name="password" type="password" autocomplete="current-password" required | |
| class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" | |
| placeholder="Password"> | |
| </div> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <input id="remember-me" name="remember-me" type="checkbox" | |
| class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded"> | |
| <label for="remember-me" class="ml-2 block text-sm text-gray-900"> | |
| Remember me | |
| </label> | |
| </div> | |
| <div class="text-sm"> | |
| <a href="#" class="font-medium text-primary hover:text-secondary"> | |
| Forgot your password? | |
| </a> | |
| </div> | |
| </div> | |
| <div> | |
| <button type="submit" | |
| class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary"> | |
| Sign in | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| // Handle login form submission | |
| const loginForm = document.querySelector('form'); | |
| if (loginForm) { | |
| loginForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Simulate successful login | |
| localStorage.setItem('isLoggedIn', 'true'); | |
| localStorage.setItem('userData', JSON.stringify({ | |
| fullName: 'Demo User', | |
| email: document.getElementById('email').value, | |
| role: 'member' | |
| })); | |
| window.location.href = '/dashboard'; | |
| }); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |