Spaces:
Running
Running
Create a complete authentication system for TaxWizard Pro with the following pages:
89b2aec verified Download login.html from EleutheroiEdge/undefined: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/spaces/EleutheroiEdge/undefined/resolve/main/login.html
- Command line
-
hf download hf://spaces/EleutheroiEdge/undefined/login.html
-
curl -L -o login.html https://huggingface.co/spaces/EleutheroiEdge/undefined/resolve/main/login.html
10.3 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TaxWizard Pro - Login</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script> | |
| <style> | |
| #vanta-bg { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| opacity: 0.15; | |
| } | |
| .auth-card { | |
| max-width: 28rem; | |
| margin: 0 auto; | |
| } | |
| .social-btn { | |
| transition: all 0.2s ease; | |
| } | |
| .social-btn:hover { | |
| transform: translateY(-2px); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex items-center justify-center p-4"> | |
| <div id="vanta-bg" class="dark:opacity-30"></div> | |
| <!-- Theme Toggle --> | |
| <button id="themeToggle" class="fixed top-4 right-4 z-50 p-2 rounded-full bg-white dark:bg-gray-800 shadow-lg"> | |
| <i data-feather="moon" class="hidden dark:block text-yellow-300"></i> | |
| <i data-feather="sun" class="dark:hidden text-yellow-500"></i> | |
| </button> | |
| <!-- Main Auth Card --> | |
| <div class="auth-card bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden border border-gray-200 dark:border-gray-700 w-full"> | |
| <div class="p-8"> | |
| <div class="text-center mb-8"> | |
| <div class="flex justify-center items-center mb-4"> | |
| <div class="bg-blue-100 dark:bg-blue-900 p-3 rounded-full"> | |
| <i data-feather="dollar-sign" class="text-blue-600 dark:text-blue-400 w-8 h-8"></i> | |
| </div> | |
| <span class="ml-2 text-xs font-semibold bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200 px-2 py-1 rounded-full">BETA</span> | |
| </div> | |
| <h1 class="text-2xl font-bold mb-1">Welcome back</h1> | |
| <p class="text-gray-600 dark:text-gray-400">Sign in to your TaxWizard Pro account</p> | |
| </div> | |
| <!-- Error Messages --> | |
| <div id="authError" class="hidden bg-red-100 dark:bg-red-900/50 border-l-4 border-red-500 dark:border-red-400 p-4 mb-6"> | |
| <div class="flex items-center"> | |
| <i data-feather="alert-circle" class="h-5 w-5 text-red-500 dark:text-red-400 mr-3"></i> | |
| <p id="errorMessage" class="text-sm text-red-700 dark:text-red-300"></p> | |
| </div> | |
| </div> | |
| <!-- Login Form --> | |
| <form id="loginForm" class="space-y-4"> | |
| <div> | |
| <label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Email</label> | |
| <input type="email" id="email" name="email" required | |
| class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white" | |
| placeholder="you@example.com"> | |
| <p id="emailError" class="hidden mt-1 text-sm text-red-600 dark:text-red-400"></p> | |
| </div> | |
| <div> | |
| <label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Password</label> | |
| <input type="password" id="password" name="password" required | |
| class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white" | |
| placeholder="••••••••"> | |
| <p id="passwordError" class="hidden mt-1 text-sm text-red-600 dark:text-red-400"></p> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <input id="remember" name="remember" type="checkbox" | |
| class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 dark:border-gray-600 rounded dark:bg-gray-700"> | |
| <label for="remember" class="ml-2 block text-sm text-gray-700 dark:text-gray-300">Remember me</label> | |
| </div> | |
| <a href="forgot-password.html" class="text-sm text-blue-600 dark:text-blue-400 hover:underline">Forgot password?</a> | |
| </div> | |
| <button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg font-medium transition"> | |
| Sign In | |
| </button> | |
| </form> | |
| <!-- Social Login (Optional) --> | |
| <div class="mt-6"> | |
| <div class="relative"> | |
| <div class="absolute inset-0 flex items-center"> | |
| <div class="w-full border-t border-gray-300 dark:border-gray-600"></div> | |
| </div> | |
| <div class="relative flex justify-center text-sm"> | |
| <span class="px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400">Or continue with</span> | |
| </div> | |
| </div> | |
| <div class="mt-6 grid grid-cols-2 gap-3"> | |
| <a href="#" class="social-btn w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-lg shadow-sm bg-white dark:bg-gray-700 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600"> | |
| <i data-feather="github" class="h-5 w-5"></i> | |
| <span class="ml-2">GitHub</span> | |
| </a> | |
| <a href="#" class="social-btn w-full inline-flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 rounded-lg shadow-sm bg-white dark:bg-gray-700 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600"> | |
| <i data-feather="google" class="h-5 w-5"></i> | |
| <span class="ml-2">Google</span> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="mt-6 text-center text-sm text-gray-600 dark:text-gray-400"> | |
| Don't have an account? <a href="signup.html" class="text-blue-600 dark:text-blue-400 hover:underline">Sign up</a> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Initialize Vanta.js | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0x3b82f6, | |
| backgroundColor: 0xffffff, | |
| size: 0.8 | |
| }); | |
| // Theme toggle functionality | |
| const themeToggle = document.getElementById('themeToggle'); | |
| const html = document.documentElement; | |
| themeToggle.addEventListener('click', () => { | |
| html.classList.toggle('dark'); | |
| localStorage.setItem('theme', html.classList.contains('dark') ? 'dark' : 'light'); | |
| // Update Vanta.js background for theme | |
| if (html.classList.contains('dark')) { | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| color: 0x3b82f6, | |
| backgroundColor: 0x111827 | |
| }); | |
| } else { | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| color: 0x3b82f6, | |
| backgroundColor: 0xffffff | |
| }); | |
| } | |
| }); | |
| // Check for saved theme preference | |
| if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) { | |
| html.classList.add('dark'); | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| color: 0x3b82f6, | |
| backgroundColor: 0x111827 | |
| }); | |
| } | |
| // Form validation | |
| document.getElementById('loginForm').addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const email = document.getElementById('email').value; | |
| const password = document.getElementById('password').value; | |
| let isValid = true; | |
| // Reset errors | |
| document.getElementById('authError').classList.add('hidden'); | |
| document.getElementById('emailError').classList.add('hidden'); | |
| document.getElementById('passwordError').classList.add('hidden'); | |
| // Email validation | |
| if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { | |
| document.getElementById('emailError').textContent = 'Please enter a valid email address'; | |
| document.getElementById('emailError').classList.remove('hidden'); | |
| isValid = false; | |
| } | |
| // Password validation | |
| if (!password || password.length < 8) { | |
| document.getElementById('passwordError').textContent = 'Password must be at least 8 characters'; | |
| document.getElementById('passwordError').classList.remove('hidden'); | |
| isValid = false; | |
| } | |
| if (isValid) { | |
| // Simulate login | |
| document.getElementById('loginForm').querySelector('button[type="submit"]').disabled = true; | |
| document.getElementById('loginForm').querySelector('button[type="submit"]').innerHTML = '<i data-feather="loader" class="animate-spin w-4 h-4 mx-auto"></i>'; | |
| setTimeout(() => { | |
| // For demo purposes, redirect to index.html | |
| window.location.href = 'index.html'; | |
| }, 1500); | |
| } | |
| }); | |
| // Re-render icons after form submission | |
| document.addEventListener('feather.replace', function() { | |
| feather.replace(); | |
| }); | |
| </script> | |
| </body> | |
| </html> |