undefined / login.html
zeeleo007's picture
create admin dashboard which controls everything add update delete and add manager and there controls and user also and add more features in it and most important enhance home page and add compare and My Bag (same function like favorite) in very selection websites, books and production. add these features in website cards (Name, category, description, url, discount or pricing) also add categories and there pages. add these features in product cards (Name, description, price, category, stock, discount) also add categories and there pages. add these features in book cards (Title, author, description, price, category, stock, discount) and add categories and there pages make it fully professional way and enhance UI of complete website
d8b1d97 verified
Raw History Blame Contribute Delete
10.4 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - WebBag Wonders</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<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>
</head>
<body class="bg-gray-50">
<div id="root"></div>
<script type="text/babel">
const { useState } = React;
function Navbar() {
return (
<nav className="bg-white shadow-sm py-4 px-6 flex items-center justify-between sticky top-0 z-50">
<div className="flex items-center space-x-2">
<i className="fas fa-briefcase text-blue-500 text-2xl"></i>
<span className="text-xl font-semibold text-gray-800">WebBag Wonders</span>
</div>
<div className="flex items-center space-x-4">
<a href="index.html" className="text-gray-600 hover:text-blue-500">Back to Home</a>
</div>
</nav>
);
}
function LoginForm() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [rememberMe, setRememberMe] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const handleSubmit = (e) => {
e.preventDefault();
setIsLoading(true);
// Simulate API call
setTimeout(() => {
setIsLoading(false);
window.location.href = "index.html"; // Redirect after login
}, 1500);
};
return (
<div className="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden p-8 mt-12">
<div className="text-center mb-8">
<h2 className="text-2xl font-bold text-gray-800 mb-2">Welcome back!</h2>
<p className="text-gray-500">Sign in to access your collection</p>
</div>
<form onSubmit={handleSubmit}>
<div className="mb-4">
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input
type="email"
id="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300"
required
/>
</div>
<div className="mb-4">
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input
type="password"
id="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300"
required
/>
</div>
<div className="flex items-center justify-between mb-6">
<div className="flex items-center">
<input
type="checkbox"
id="remember"
checked={rememberMe}
onChange={(e) => setRememberMe(e.target.checked)}
className="h-4 w-4 text-blue-500 focus:ring-blue-300 border-gray-300 rounded"
/>
<label htmlFor="remember" className="ml-2 block text-sm text-gray-700">
Remember me
</label>
</div>
<a href="#" className="text-sm text-blue-500 hover:text-blue-600">
Forgot password?
</a>
</div>
<button
type="submit"
disabled={isLoading}
className={`w-full py-2 px-4 rounded-lg text-white font-medium ${isLoading ? 'bg-blue-400' : 'bg-blue-500 hover:bg-blue-600'}`}
>
{isLoading ? (
<span className="flex items-center justify-center">
<svg className="animate-spin -ml-1 mr-2 h-4 w-4 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Signing in...
</span>
) : 'Sign In'}
</button>
</form>
<div className="mt-6 text-center">
<p className="text-gray-500 text-sm">
Don't have an account? <a href="signup.html" className="text-blue-500 hover:text-blue-600">Sign up</a>
</p>
</div>
<div className="mt-6">
<div className="relative">
<div className="absolute inset-0 flex items-center">
<div className="w-full border-t border-gray-300"></div>
</div>
<div className="relative flex justify-center text-sm">
<span className="px-2 bg-white text-gray-500">Or continue with</span>
</div>
</div>
<div className="mt-6 grid grid-cols-2 gap-3">
<button className="w-full py-2 px-4 border border-gray-300 rounded-lg flex items-center justify-center hover:bg-gray-50">
<i className="fab fa-google text-red-500 mr-2"></i>
<span className="text-sm font-medium text-gray-700">Google</span>
</button>
<button className="w-full py-2 px-4 border border-gray-300 rounded-lg flex items-center justify-center hover:bg-gray-50">
<i className="fab fa-github text-gray-700 mr-2"></i>
<span className="text-sm font-medium text-gray-700">GitHub</span>
</button>
</div>
</div>
</div>
);
}
function Footer() {
return (
<footer className="bg-white border-t border-gray-200 py-8 mt-12">
<div className="container mx-auto px-4">
<div className="flex flex-col md:flex-row justify-between items-center">
<div className="mb-4 md:mb-0">
<div className="flex items-center space-x-2">
<i className="fas fa-briefcase text-blue-500 text-xl"></i>
<span className="text-lg font-semibold text-gray-800">WebBag Wonders</span>
</div>
<p className="text-gray-500 text-sm mt-2">Your digital companion for all things web</p>
</div>
<div className="flex space-x-6">
<a href="#" className="text-gray-500 hover:text-blue-500">
<i className="fab fa-twitter"></i>
</a>
<a href="#" className="text-gray-500 hover:text-blue-500">
<i className="fab fa-facebook"></i>
</a>
<a href="#" className="text-gray-500 hover:text-blue-500">
<i className="fab fa-instagram"></i>
</a>
<a href="#" className="text-gray-500 hover:text-blue-500">
<i className="fab fa-github"></i>
</a>
</div>
</div>
<div className="border-t border-gray-200 mt-6 pt-6 text-center text-gray-500 text-sm">
<p>© 2023 WebBag Wonders. All rights reserved.</p>
</div>
</div>
</footer>
);
}
function App() {
return (
<div className="min-h-screen flex flex-col">
<Navbar />
<LoginForm />
<Footer />
</div>
);
}
ReactDOM.render(<App />, document.getElementById('root'));
</script>
</body>
</html>