File size: 12,586 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<!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, badge }) {
            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 relative">
                        {badge && (
                            <span className="absolute top-4 right-4 bg-red-500 text-white text-xs px-2 py-1 rounded-full">
                                {badge}
                            </span>
                        )}
                        <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 mb-4">{description}</p>
                        <div className="flex justify-between items-center">
                            <button className="text-blue-500 hover:text-blue-700">
                                <i className="fas fa-exchange-alt mr-1"></i> Compare
                            </button>
                            <button className="text-purple-500 hover:text-purple-700">
                                <i className="fas fa-shopping-bag mr-1"></i> Add to Bag
                            </button>
                        </div>
                    </div>
                </a>
            );
        }
        function HomePage() {
            const cards = [
                {
                    icon: "fas fa-globe",
                    title: "Websites",
                    description: "Discover and save your favorite websites",
                    link: "websites.html",
                    badge: "New"
                },
                {
                    icon: "fas fa-book-open",
                    title: "Books",
                    description: "Explore and organize your digital library",
                    link: "books.html",
                    badge: "Popular"
                },
                {
                    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"
                },
                {
                    icon: "fas fa-chart-line",
                    title: "Trending",
                    description: "See what's trending across all categories",
                    link: "trending.html",
                    badge: "Hot"
                },
                {
                    icon: "fas fa-tags",
                    title: "Deals",
                    description: "Find the best deals and discounts",
                    link: "deals.html"
                },
                {
                    icon: "fas fa-star",
                    title: "My Bag",
                    description: "View your saved items",
                    link: "mybag.html"
                },
                {
                    icon: "fas fa-cog",
                    title: "Settings",
                    description: "Customize your experience",
                    link: "settings.html"
                }
            ];
return (
                <div className="container mx-auto px-4 py-8">
                    <div className="mb-8">
                        <div className="relative w-full h-64 rounded-xl overflow-hidden bg-gradient-to-r from-blue-500 to-purple-600">
                            <div className="absolute inset-0 flex items-center pl-12">
                                <div className="max-w-md">
                                    <h2 className="text-3xl font-bold text-white mb-2">Welcome to WebWizard</h2>
                                    <p className="text-blue-100 mb-4">Your ultimate digital companion for organizing the web</p>
                                    <button className="bg-white text-blue-600 px-6 py-2 rounded-lg font-medium hover:bg-blue-50">
                                        Get Started
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <h2 className="text-2xl font-bold text-gray-800 mb-6">Categories</h2>
                    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                        {cards.map((card, index) => (
                            <MainCard key={index} {...card} />
                        ))}
                    </div>

                    <div className="mt-12">
                        <h2 className="text-2xl font-bold text-gray-800 mb-6">Featured Collections</h2>
                        <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
                            <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100">
                                <div className="flex items-center mb-4">
                                    <div className="bg-blue-100 p-3 rounded-full mr-4">
                                        <i className="fas fa-laptop-code text-blue-500 text-xl"></i>
                                    </div>
                                    <h3 className="text-lg font-semibold text-gray-800">Developer Tools</h3>
                                </div>
                                <p className="text-gray-500 mb-4">Essential tools for developers and programmers</p>
                                <button className="text-blue-500 hover:text-blue-700">Explore Collection</button>
                            </div>
                            <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100">
                                <div className="flex items-center mb-4">
                                    <div className="bg-green-100 p-3 rounded-full mr-4">
                                        <i className="fas fa-book text-green-500 text-xl"></i>
                                    </div>
                                    <h3 className="text-lg font-semibold text-gray-800">Must-Read Books</h3>
                                </div>
                                <p className="text-gray-500 mb-4">Top-rated books for tech enthusiasts</p>
                                <button className="text-blue-500 hover:text-blue-700">Explore Collection</button>
                            </div>
                            <div className="bg-white rounded-xl p-6 shadow-md border border-gray-100">
                                <div className="flex items-center mb-4">
                                    <div className="bg-purple-100 p-3 rounded-full mr-4">
                                        <i className="fas fa-headphones text-purple-500 text-xl"></i>
                                    </div>
                                    <h3 className="text-lg font-semibold text-gray-800">Tech Gadgets</h3>
                                </div>
                                <p className="text-gray-500 mb-4">Cool gadgets every tech lover should have</p>
                                <button className="text-blue-500 hover:text-blue-700">Explore Collection</button>
                            </div>
                        </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 />
                    <HomePage />
                    <Footer />
                </div>
            );
        }

        ReactDOM.render(<App />, document.getElementById('root'));
    </script>
</body>
</html>