Spaces:
Running
Running
File size: 6,916 Bytes
b638907 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | Portfolio Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.input-focus:focus {
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}
</style>
</head>
<body class="min-h-screen flex items-center justify-center gradient-bg">
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect } = React;
function LoginForm() {
const [username, setUsername] = useState('');
const [password, setPassword] = useState('');
const [rememberMe, setRememberMe] = useState(false);
useEffect(() => {
AOS.init({
duration: 800,
easing: 'ease-in-out',
once: true
});
feather.replace();
}, []);
const handleSubmit = (e) => {
e.preventDefault();
// Handle login logic here
console.log({ username, password, rememberMe });
};
return (
<div className="w-full max-w-md px-8 py-12 mx-4 bg-white rounded-xl shadow-2xl" data-aos="fade-up">
<div className="text-center mb-10">
<div className="flex justify-center mb-6">
<i data-feather="lock" className="w-12 h-12 text-indigo-600"></i>
</div>
<h1 className="text-3xl font-bold text-gray-800 mb-2">Welcome Back</h1>
<p className="text-gray-600">Sign in to access your portfolio dashboard</p>
</div>
<form className="space-y-6" onSubmit={handleSubmit}>
<div>
<label htmlFor="username" className="block text-sm font-medium text-gray-700 mb-1">Username</label>
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="user" className="h-5 w-5 text-gray-400"></i>
</div>
<input
id="username"
name="username"
type="text"
required
className="input-focus pl-10 block w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none transition duration-200"
placeholder="Enter your username"
value={username}
onChange={(e) => setUsername(e.target.value)}
/>
</div>
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1">Password</label>
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="key" className="h-5 w-5 text-gray-400"></i>
</div>
<input
id="password"
name="password"
type="password"
required
className="input-focus pl-10 block w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none transition duration-200"
placeholder="••••••••"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
</div>
</div>
<div className="flex items-center justify-between">
<div className="flex items-center">
<input
id="remember-me"
name="remember-me"
type="checkbox"
className="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded"
checked={rememberMe}
onChange={(e) => setRememberMe(e.target.checked)}
/>
<label htmlFor="remember-me" className="ml-2 block text-sm text-gray-700">Remember me</label>
</div>
<div className="text-sm">
<a href="#" className="font-medium text-indigo-600 hover:text-indigo-500">Forgot password?</a>
</div>
</div>
<div>
<button type="submit"
className="w-full flex justify-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition duration-200">
Sign in
</button>
</div>
</form>
<div className="mt-8 text-center">
<p className="text-sm text-gray-600">
Don't have an account?
<a href="#" className="font-medium text-indigo-600 hover:text-indigo-500">Request access</a>
</p>
</div>
</div>
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<LoginForm />);
</script>
</body>
</html> |