File size: 7,059 Bytes
d8b1d97 | 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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebBag Wonders - Your Digital Companion</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>
<style>
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
</style>
</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-1 max-w-md mx-4">
<div className="relative">
<input
type="text"
placeholder="Search..."
className="w-full py-2 px-4 rounded-full border border-gray-200 focus:outline-none focus:ring-2 focus:ring-blue-300"
/>
<button className="absolute right-3 top-2 text-gray-400">
<i className="fas fa-search"></i>
</button>
</div>
</div>
<div className="flex items-center space-x-4">
<button className="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-full text-sm font-medium">
Sign In
</button>
<div className="w-10 h-10 rounded-full bg-gray-200 flex items-center justify-center">
<i className="fas fa-user text-gray-600"></i>
</div>
</div>
</nav>
);
}
function MainCard({ icon, title, description, link }) {
return (
<a href={link} className="block">
<div className="bg-white rounded-xl p-6 shadow-md border border-gray-100 transition-all duration-300 card-hover h-full">
<div className="text-4xl text-blue-500 mb-4">
<i className={icon}></i>
</div>
<h3 className="text-xl font-semibold text-gray-800 mb-2">{title}</h3>
<p className="text-gray-500">{description}</p>
</div>
</a>
);
}
function HomePage() {
const cards = [
{
icon: "fas fa-globe",
title: "Websites",
description: "Discover and save your favorite websites",
link: "websites.html"
},
{
icon: "fas fa-book-open",
title: "Books",
description: "Explore and organize your digital library",
link: "books.html"
},
{
icon: "fas fa-shopping-bag",
title: "Products",
description: "Track and wishlist products you love",
link: "products.html"
},
{
icon: "fas fa-users",
title: "Community",
description: "Connect with like-minded collectors",
link: "community.html"
}
];
return (
<div className="container mx-auto px-4 py-8">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mt-8">
{cards.map((card, index) => (
<MainCard key={index} {...card} />
))}
</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 />
<HomePage />
<Footer />
</div>
);
}
ReactDOM.render(<App />, document.getElementById('root'));
</script>
</body>
</html> |