lodgemaster-pro-suite / login.html
keronblackdev's picture
create the login page
8304476 verified
Raw History Blame Contribute Delete
7.98 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LodgeMaster Pro | Login</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-50">
<div class="min-h-screen flex items-center justify-center p-4">
<div class="w-full max-w-md bg-white rounded-2xl shadow-xl overflow-hidden animate__animated animate__fadeIn">
<!-- Logo Header -->
<div class="bg-gradient-to-r from-blue-600 to-indigo-600 p-6 text-center">
<div class="flex justify-center">
<div class="w-20 h-20 rounded-full bg-white/20 flex items-center justify-center mb-4">
<i data-feather="home" class="w-10 h-10 text-white"></i>
</div>
</div>
<h2 class="text-3xl font-bold text-white">LodgeMaster Pro</h2>
<p class="mt-2 text-white/90">Sign in to your account</p>
</div>
<!-- Login Form -->
<div class="p-8">
<form id="loginForm" class="space-y-6">
<div class="space-y-2">
<label for="email" class="block text-sm font-medium text-gray-700">Email Address</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
</div>
<input id="email" name="email" type="email" autocomplete="email" required
class="block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"
placeholder="admin@lodge.com">
</div>
</div>
<div class="space-y-2">
<label for="password" class="block text-sm font-medium text-gray-700">Password</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
</div>
<input id="password" name="password" type="password" autocomplete="current-password" required
class="block w-full pl-10 pr-3 py-3 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"
placeholder="••••••••">
<button type="button" id="togglePassword" class="absolute inset-y-0 right-0 pr-3 flex items-center">
<i data-feather="eye" class="h-5 w-5 text-gray-400"></i>
</button>
</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-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="remember-me" class="ml-2 block text-sm text-gray-700">
Remember me
</label>
</div>
<div class="text-sm">
<a href="/forgot-password.html" class="font-medium text-blue-600 hover:text-blue-500">
Forgot password?
</a>
</div>
</div>
<div>
<button type="submit" id="loginBtn"
class="w-full flex justify-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200">
<span class="flex items-center">
<i data-feather="log-in" class="h-5 w-5 mr-2"></i>
Sign In
</span>
</button>
</div>
</form>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white text-gray-500">
Don't have an account?
</span>
</div>
</div>
<div class="mt-6">
<a href="/register.html" class="w-full flex justify-center py-2 px-4 border border-gray-300 rounded-lg shadow-sm text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
Create new account
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Toast Notification -->
<toast-notification id="loginToast"></toast-notification>
<script src="script.js"></script>
<script src="components/toast-notification.js"></script>
<script>
feather.replace();
// Password visibility toggle
document.getElementById('togglePassword').addEventListener('click', function() {
const passwordInput = document.getElementById('password');
const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
passwordInput.setAttribute('type', type);
this.innerHTML = feather.icons[type === 'password' ? 'eye' : 'eye-off'].toSvg();
});
// Form submission
document.getElementById('loginForm').addEventListener('submit', async function(e) {
e.preventDefault();
const loginBtn = document.getElementById('loginBtn');
const originalText = loginBtn.innerHTML;
try {
// Show loading state
loginBtn.disabled = true;
loginBtn.innerHTML = 'Authenticating...';
loginBtn.classList.remove('bg-blue-600', 'hover:bg-blue-700');
loginBtn.classList.add('bg-blue-400');
// Simulate API call
await new Promise(resolve => setTimeout(resolve, 1500));
// Redirect on successful login
window.location.href = '/dashboard.html';
} catch (error) {
const toast = document.getElementById('loginToast');
toast.setAttribute('type', 'error');
toast.setAttribute('message', 'Invalid email or password');
toast.render();
loginBtn.innerHTML = originalText;
loginBtn.disabled = false;
loginBtn.classList.add('bg-blue-600', 'hover:bg-blue-700');
loginBtn.classList.remove('bg-blue-400');
}
});
</script>
</body>
</html>