Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Login | CareerVoice</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://unpkg.com/@supabase/supabase-js@2"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .gradient-text { | |
| background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%); | |
| -webkit-background-clip: text; | |
| background-clip: text; | |
| color: transparent; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex items-center justify-center"> | |
| <div class="max-w-md w-full bg-white p-8 rounded-2xl shadow-lg"> | |
| <div class="text-center mb-8"> | |
| <div class="flex items-center justify-center"> | |
| <i data-feather="compass" class="text-primary h-6 w-6"></i> | |
| <span class="ml-2 text-2xl font-bold gradient-text">CareerVoice</span> | |
| </div> | |
| <h1 class="mt-4 text-2xl font-bold text-gray-900">Welcome back</h1> | |
| <p class="mt-2 text-gray-600">Sign in to continue your career journey</p> | |
| </div> | |
| <div id="emailLogin" class="space-y-4"> | |
| <div> | |
| <label for="email" class="block text-sm font-medium text-gray-700">Email address</label> | |
| <input type="email" id="email" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary"> | |
| </div> | |
| <div> | |
| <label for="password" class="block text-sm font-medium text-gray-700">Password</label> | |
| <input type="password" id="password" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary"> | |
| </div> | |
| <button id="loginBtn" class="w-full bg-primary text-white py-2 px-4 rounded-md hover:bg-secondary transition-colors flex items-center justify-center"> | |
| <i data-feather="log-in" class="mr-2"></i> Sign In | |
| </button> | |
| </div> | |
| <div class="mt-6 text-center"> | |
| <p class="text-sm text-gray-600"> | |
| Don't have an account? | |
| <a href="/register.html" class="font-medium text-primary hover:text-secondary">Register here</a> | |
| </p> | |
| </div> | |
| <div class="mt-8 pt-6 border-t border-gray-200"> | |
| <button id="googleLogin" class="w-full bg-white border border-gray-300 text-gray-700 py-2 px-4 rounded-md hover:bg-gray-50 transition-colors flex items-center justify-center"> | |
| <i data-feather="github" class="mr-2"></i> Continue with Google | |
| </button> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| const supabaseUrl = 'https://your-project.supabase.co'; | |
| const supabaseKey = 'your-anon-key'; | |
| const supabase = supabase.createClient(supabaseUrl, supabaseKey); | |
| document.getElementById('loginBtn').addEventListener('click', async () => { | |
| const email = document.getElementById('email').value; | |
| const password = document.getElementById('password').value; | |
| const { data, error } = await supabase.auth.signInWithPassword({ | |
| email, | |
| password | |
| }); | |
| if (error) { | |
| alert('Login failed: ' + error.message); | |
| } else { | |
| window.location.href = '/dashboard.html'; | |
| } | |
| }); | |
| document.getElementById('googleLogin').addEventListener('click', async () => { | |
| const { data, error } = await supabase.auth.signInWithOAuth({ | |
| provider: 'google', | |
| }); | |
| if (error) { | |
| alert('Google login failed: ' + error.message); | |
| } | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |