matthewspring commited on
Commit
299d4e2
·
verified ·
1 Parent(s): ed60a98

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +722 -19
index.html CHANGED
@@ -1,19 +1,722 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>MissingFair | Lost Items Dashboard</title>
7
+
8
+ <!-- Tailwind CSS -->
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+
11
+ <!-- FontAwesome -->
12
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
13
+
14
+ <!-- Google Fonts -->
15
+ <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
16
+
17
+ <script>
18
+ tailwind.config = {
19
+ theme: {
20
+ extend: {
21
+ fontFamily: {
22
+ sans: ['Inter', 'sans-serif'],
23
+ display: ['Space Grotesk', 'sans-serif'],
24
+ },
25
+ colors: {
26
+ glass: 'rgba(255, 255, 255, 0.05)',
27
+ glassBorder: 'rgba(255, 255, 255, 0.1)',
28
+ accent: '#6366f1',
29
+ accentHover: '#4f46e5',
30
+ },
31
+ animation: {
32
+ 'float': 'float 6s ease-in-out infinite',
33
+ 'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
34
+ 'slide-up': 'slideUp 0.5s ease-out forwards',
35
+ 'fade-in': 'fadeIn 0.5s ease-out forwards',
36
+ },
37
+ keyframes: {
38
+ float: {
39
+ '0%, 100%': { transform: 'translateY(0)' },
40
+ '50%': { transform: 'translateY(-20px)' },
41
+ },
42
+ slideUp: {
43
+ '0%': { opacity: '0', transform: 'translateY(20px)' },
44
+ '100%': { opacity: '1', transform: 'translateY(0)' },
45
+ },
46
+ fadeIn: {
47
+ '0%': { opacity: '0' },
48
+ '100%': { opacity: '1' },
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ </script>
55
+
56
+ <style>
57
+ body {
58
+ background-color: #0f172a;
59
+ background-image:
60
+ radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
61
+ radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
62
+ radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
63
+ background-attachment: fixed;
64
+ min-height: 100vh;
65
+ }
66
+
67
+ .glass-panel {
68
+ background: rgba(30, 41, 59, 0.7);
69
+ backdrop-filter: blur(12px);
70
+ -webkit-backdrop-filter: blur(12px);
71
+ border: 1px solid rgba(255, 255, 255, 0.1);
72
+ }
73
+
74
+ .custom-scrollbar::-webkit-scrollbar {
75
+ width: 6px;
76
+ }
77
+ .custom-scrollbar::-webkit-scrollbar-track {
78
+ background: rgba(255, 255, 255, 0.05);
79
+ }
80
+ .custom-scrollbar::-webkit-scrollbar-thumb {
81
+ background: rgba(255, 255, 255, 0.2);
82
+ border-radius: 3px;
83
+ }
84
+
85
+ .grid-pattern {
86
+ background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
87
+ linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
88
+ background-size: 30px 30px;
89
+ }
90
+
91
+ .item-enter {
92
+ animation: slideUp 0.4s ease-out forwards;
93
+ }
94
+ </style>
95
+ </head>
96
+ <body class="text-slate-300 font-sans overflow-x-hidden">
97
+
98
+ <!-- Navbar -->
99
+ <nav class="fixed w-full z-50 glass-panel border-b border-white/10">
100
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
101
+ <div class="flex items-center justify-between h-16">
102
+ <div class="flex items-center gap-3">
103
+ <div class="w-8 h-8 rounded-lg bg-gradient-to-br from-indigo-500 to-purple-500 flex items-center justify-center text-white font-bold text-lg">
104
+ M
105
+ </div>
106
+ <span class="font-display font-bold text-xl text-white tracking-tight">MissingFair</span>
107
+ </div>
108
+
109
+ <div class="hidden md:block">
110
+ <div class="flex items-baseline space-x-4">
111
+ <a href="#" class="text-white px-3 py-2 rounded-md text-sm font-medium hover:bg-white/10 transition-colors">Dashboard</a>
112
+ <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium hover:bg-white/10 transition-colors">Reports</a>
113
+ <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium hover:bg-white/10 transition-colors">Settings</a>
114
+ </div>
115
+ </div>
116
+
117
+ <div class="flex items-center gap-4">
118
+ <button class="relative p-2 text-gray-400 hover:text-white transition-colors">
119
+ <i class="fa-solid fa-bell text-lg"></i>
120
+ <span class="absolute top-1 right-1 w-2 h-2 bg-rose-500 rounded-full animate-pulse"></span>
121
+ </button>
122
+ <div class="h-8 w-8 rounded-full bg-gradient-to-r from-blue-500 to-cyan-500 border-2 border-white/20 cursor-pointer"></div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </nav>
127
+
128
+ <!-- Main Content -->
129
+ <main class="pt-24 pb-12 px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
130
+
131
+ <!-- Hero Section -->
132
+ <div class="relative rounded-3xl overflow-hidden mb-10 border border-white/10 shadow-2xl">
133
+ <div class="absolute inset-0 bg-gradient-to-r from-indigo-900/90 to-purple-900/90 z-10"></div>
134
+ <div class="absolute inset-0 grid-pattern opacity-30"></div>
135
+
136
+ <!-- Animated Blobs -->
137
+ <div class="absolute top-0 left-0 w-72 h-72 bg-purple-500 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-float"></div>
138
+ <div class="absolute bottom-0 right-0 w-72 h-72 bg-indigo-500 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-float" style="animation-delay: 2s;"></div>
139
+
140
+ <div class="relative z-20 px-8 py-16 md:py-20 md:px-12 text-center md:text-left flex flex-col md:flex-row items-center justify-between gap-8">
141
+ <div class="max-w-2xl">
142
+ <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-white/10 border border-white/10 text-xs font-medium text-indigo-200 mb-6 backdrop-blur-sm">
143
+ <span class="relative flex h-2 w-2">
144
+ <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-indigo-400 opacity-75"></span>
145
+ <span class="relative inline-flex rounded-full h-2 w-2 bg-indigo-500"></span>
146
+ </span>
147
+ Live System Active
148
+ </div>
149
+ <h1 class="text-4xl md:text-6xl font-display font-bold text-white mb-6 leading-tight">
150
+ Find What You've <br/>
151
+ <span class="text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-cyan-400">Lost & Forgotten</span>
152
+ </h1>
153
+ <p class="text-lg text-slate-300 mb-8 max-w-xl leading-relaxed">
154
+ The modern lost & found platform. Report lost items, search the database, and reunite people with their belongings using our intelligent matching system.
155
+ </p>
156
+ <div class="flex flex-col sm:flex-row gap-4 justify-center md:justify-start">
157
+ <button onclick="scrollToItems()" class="px-8 py-4 bg-white text-indigo-900 rounded-xl font-bold text-lg hover:bg-slate-100 transition-all transform hover:scale-105 shadow-lg shadow-indigo-500/20 flex items-center justify-center gap-2">
158
+ <i class="fa-solid fa-magnifying-glass"></i> Browse Items
159
+ </button>
160
+ <button onclick="openReportModal()" class="px-8 py-4 bg-indigo-600/30 backdrop-blur-md border border-indigo-400/30 text-white rounded-xl font-bold text-lg hover:bg-indigo-600/50 transition-all flex items-center justify-center gap-2">
161
+ <i class="fa-solid fa-circle-plus"></i> Report Item
162
+ </button>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Visual Indicator -->
167
+ <div class="hidden lg:block relative w-80 h-80">
168
+ <div class="absolute inset-0 bg-gradient-to-tr from-indigo-500 to-purple-500 rounded-full opacity-20 animate-pulse-slow"></div>
169
+ <div class="absolute inset-4 glass-panel rounded-full flex items-center justify-center border-2 border-white/20">
170
+ <div class="text-center">
171
+ <div class="text-5xl font-display font-bold text-white mb-1">1,284</div>
172
+ <div class="text-sm text-indigo-200 uppercase tracking-wider">Items Reunited</div>
173
+ </div>
174
+ </div>
175
+ <!-- Orbiting particles -->
176
+ <div class="absolute top-0 left-1/2 w-4 h-4 bg-white rounded-full shadow-[0_0_10px_rgba(255,255,255,0.8)] animate-[spin_4s_linear_infinite]" style="transform-origin: 0 160px;"></div>
177
+ </div>
178
+ </div>
179
+ </div>
180
+
181
+ <!-- Stats Row -->
182
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-10">
183
+ <div class="glass-panel p-6 rounded-2xl flex items-center gap-4 hover:bg-white/5 transition-colors cursor-default group">
184
+ <div class="w-12 h-12 rounded-xl bg-blue-500/20 text-blue-400 flex items-center justify-center text-xl group-hover:scale-110 transition-transform">
185
+ <i class="fa-solid fa-box-open"></i>
186
+ </div>
187
+ <div>
188
+ <div class="text-2xl font-bold text-white" id="stat-lost">142</div>
189
+ <div class="text-sm text-slate-400">Lost Reports</div>
190
+ </div>
191
+ </div>
192
+
193
+ <div class="glass-panel p-6 rounded-2xl flex items-center gap-4 hover:bg-white/5 transition-colors cursor-default group">
194
+ <div class="w-12 h-12 rounded-xl bg-emerald-500/20 text-emerald-400 flex items-center justify-center text-xl group-hover:scale-110 transition-transform">
195
+ <i class="fa-solid fa-hand-holding-heart"></i>
196
+ </div>
197
+ <div>
198
+ <div class="text-2xl font-bold text-white" id="stat-found">89</div>
199
+ <div class="text-sm text-slate-400">Found Items</div>
200
+ </div>
201
+ </div>
202
+
203
+ <div class="glass-panel p-6 rounded-2xl flex items-center gap-4 hover:bg-white/5 transition-colors cursor-default group">
204
+ <div class="w-12 h-12 rounded-xl bg-purple-500/20 text-purple-400 flex items-center justify-center text-xl group-hover:scale-110 transition-transform">
205
+ <i class="fa-solid fa-check-double"></i>
206
+ </div>
207
+ <div>
208
+ <div class="text-2xl font-bold text-white" id="stat-resolved">64</div>
209
+ <div class="text-sm text-slate-400">Resolved Cases</div>
210
+ </div>
211
+ </div>
212
+
213
+ <div class="glass-panel p-6 rounded-2xl flex items-center gap-4 hover:bg-white/5 transition-colors cursor-default group">
214
+ <div class="w-12 h-12 rounded-xl bg-rose-500/20 text-rose-400 flex items-center justify-center text-xl group-hover:scale-110 transition-transform">
215
+ <i class="fa-solid fa-clock"></i>
216
+ </div>
217
+ <div>
218
+ <div class="text-2xl font-bold text-white">12h</div>
219
+ <div class="text-sm text-slate-400">Avg. Response</div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+
224
+ <!-- Controls & Filters -->
225
+ <div class="flex flex-col md:flex-row justify-between items-center gap-4 mb-6 glass-panel p-4 rounded-2xl sticky top-20 z-30 backdrop-blur-xl border border-white/10 shadow-2xl">
226
+ <div class="flex gap-2 w-full md:w-auto overflow-x-auto pb-2 md:pb-0 no-scrollbar" id="filter-container">
227
+ <button onclick="filterItems('all')" class="filter-btn active px-4 py-2 rounded-lg text-sm font-medium bg-white/10 text-white border border-white/10 hover:bg-white/20 transition-all whitespace-nowrap" data-filter="all">All Items</button>
228
+ <button onclick="filterItems('electronics')" class="filter-btn px-4 py-2 rounded-lg text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 transition-all whitespace-nowrap" data-filter="electronics">Electronics</button>
229
+ <button onclick="filterItems('accessories')" class="filter-btn px-4 py-2 rounded-lg text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 transition-all whitespace-nowrap" data-filter="accessories">Accessories</button>
230
+ <button onclick="filterItems('documents')" class="filter-btn px-4 py-2 rounded-lg text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 transition-all whitespace-nowrap" data-filter="documents">Documents</button>
231
+ <button onclick="filterItems('other')" class="filter-btn px-4 py-2 rounded-lg text-sm font-medium text-slate-400 hover:text-white hover:bg-white/5 transition-all whitespace-nowrap" data-filter="other">Other</button>
232
+ </div>
233
+
234
+ <div class="flex gap-3 w-full md:w-auto">
235
+ <div class="relative flex-1 md:w-64">
236
+ <i class="fa-solid fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-slate-400"></i>
237
+ <input type="text" id="searchInput" placeholder="Search items..." class="w-full bg-slate-800/50 border border-white/10 rounded-lg py-2 pl-10 pr-4 text-sm text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-transparent transition-all">
238
+ </div>
239
+ <button onclick="toggleView()" id="viewToggle" class="p-2 rounded-lg bg-slate-800/50 border border-white/10 text-slate-400 hover:text-white transition-colors">
240
+ <i class="fa-solid fa-list"></i>
241
+ </button>
242
+ </div>
243
+ </div>
244
+
245
+ <!-- Items Grid -->
246
+ <div id="itemsContainer" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
247
+ <!-- Items will be injected here by JS -->
248
+ </div>
249
+
250
+ <!-- Empty State -->
251
+ <div id="emptyState" class="hidden flex-col items-center justify-center py-20 text-center">
252
+ <div class="w-24 h-24 rounded-full bg-white/5 flex items-center justify-center mb-6">
253
+ <i class="fa-solid fa-box-open text-4xl text-slate-600"></i>
254
+ </div>
255
+ <h3 class="text-xl font-bold text-white mb-2">No items found</h3>
256
+ <p class="text-slate-400 max-w-sm">Try adjusting your search or filters to find what you're looking for.</p>
257
+ </div>
258
+
259
+ </main>
260
+
261
+ <!-- Footer -->
262
+ <footer class="border-t border-white/10 bg-slate-900/50 backdrop-blur-lg mt-12">
263
+ <div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center gap-4">
264
+ <div class="flex items-center gap-2">
265
+ <div class="w-6 h-6 rounded bg-indigo-600 flex items-center justify-center text-white text-xs font-bold">M</div>
266
+ <span class="text-slate-400 text-sm">Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-indigo-400 hover:text-indigo-300 underline">anycoder</a></span>
267
+ </div>
268
+ <div class="flex gap-6 text-sm text-slate-500">
269
+ <a href="#" class="hover:text-slate-300 transition-colors">Privacy</a>
270
+ <a href="#" class="hover:text-slate-300 transition-colors">Terms</a>
271
+ <a href="#" class="hover:text-slate-300 transition-colors">Contact</a>
272
+ </div>
273
+ </div>
274
+ </footer>
275
+
276
+ <!-- Item Detail Modal -->
277
+ <div id="itemModal" class="fixed inset-0 z-50 hidden overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
278
+ <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
279
+ <div class="fixed inset-0 bg-slate-900/90 backdrop-blur-sm transition-opacity" aria-hidden="true" onclick="closeModal()"></div>
280
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
281
+ <div class="inline-block align-bottom glass-panel rounded-2xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg w-full border border-white/10">
282
+ <div class="relative h-48 bg-slate-800 overflow-hidden group">
283
+ <img id="modalImage" src="" alt="Item" class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-110">
284
+ <div class="absolute inset-0 bg-gradient-to-t from-slate-900 to-transparent"></div>
285
+ <button onclick="closeModal()" class="absolute top-4 right-4 w-8 h-8 rounded-full bg-black/50 text-white flex items-center justify-center hover:bg-black/70 transition-colors">
286
+ <i class="fa-solid fa-times"></i>
287
+ </button>
288
+ <span id="modalType" class="absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-bold bg-indigo-500 text-white shadow-lg"></span>
289
+ </div>
290
+ <div class="p-6">
291
+ <div class="flex justify-between items-start mb-4">
292
+ <div>
293
+ <h3 id="modalTitle" class="text-2xl font-display font-bold text-white mb-1"></h3>
294
+ <p id="modalCategory" class="text-sm text-slate-400"></p>
295
+ </div>
296
+ <div id="modalStatus" class="px-3 py-1 rounded-full text-xs font-bold bg-emerald-500/20 text-emerald-400 border border-emerald-500/20">
297
+ Active
298
+ </div>
299
+ </div>
300
+
301
+ <div class="space-y-4 mb-6">
302
+ <div class="flex items-start gap-3">
303
+ <div class="w-8 h-8 rounded-lg bg-slate-800 flex items-center justify-center text-slate-400 flex-shrink-0">
304
+ <i class="fa-solid fa-location-dot"></i>
305
+ </div>
306
+ <div>
307
+ <p class="text-xs text-slate-500 uppercase tracking-wider font-semibold">Location</p>
308
+ <p id="modalLocation" class="text-slate-200"></p>
309
+ </div>
310
+ </div>
311
+ <div class="flex items-start gap-3">
312
+ <div class="w-8 h-8 rounded-lg bg-slate-800 flex items-center justify-center text-slate-400 flex-shrink-0">
313
+ <i class="fa-regular fa-calendar"></i>
314
+ </div>
315
+ <div>
316
+ <p class="text-xs text-slate-500 uppercase tracking-wider font-semibold">Date</p>
317
+ <p id="modalDate" class="text-slate-200"></p>
318
+ </div>
319
+ </div>
320
+ <div class="flex items-start gap-3">
321
+ <div class="w-8 h-8 rounded-lg bg-slate-800 flex items-center justify-center text-slate-400 flex-shrink-0">
322
+ <i class="fa-solid fa-align-left"></i>
323
+ </div>
324
+ <div>
325
+ <p class="text-xs text-slate-500 uppercase tracking-wider font-semibold">Description</p>
326
+ <p id="modalDesc" class="text-slate-300 text-sm leading-relaxed"></p>
327
+ </div>
328
+ </div>
329
+ </div>
330
+
331
+ <div class="flex gap-3 pt-4 border-t border-white/10">
332
+ <button class="flex-1 py-3 bg-indigo-600 hover:bg-indigo-500 text-white rounded-xl font-semibold transition-colors shadow-lg shadow-indigo-500/25 flex items-center justify-center gap-2">
333
+ <i class="fa-solid fa-envelope"></i> Contact
334
+ </button>
335
+ <button class="flex-1 py-3 bg-slate-800 hover:bg-slate-700 text-white rounded-xl font-semibold transition-colors border border-white/10 flex items-center justify-center gap-2">
336
+ <i class="fa-solid fa-share-nodes"></i> Share
337
+ </button>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ </div>
342
+ </div>
343
+
344
+ <!-- Report Modal -->
345
+ <div id="reportModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
346
+ <div class="flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0">
347
+ <div class="fixed inset-0 transition-opacity bg-slate-900/90 backdrop-blur-sm" onclick="closeReportModal()"></div>
348
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen">&#8203;</span>
349
+ <div class="inline-block w-full max-w-2xl p-0 my-8 overflow-hidden text-left align-middle transition-all transform glass-panel rounded-2xl border border-white/10 shadow-2xl">
350
+ <div class="px-6 py-4 border-b border-white/10 flex justify-between items-center bg-white/5">
351
+ <h3 class="text-lg font-display font-bold text-white">Report Item</h3>
352
+ <button onclick="closeReportModal()" class="text-slate-400 hover:text-white transition-colors">
353
+ <i class="fa-solid fa-times"></i>
354
+ </button>
355
+ </div>
356
+ <form id="reportForm" onsubmit="handleReport(event)" class="p-6 space-y-4">
357
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
358
+ <div class="space-y-1">
359
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Type</label>
360
+ <div class="flex gap-2">
361
+ <label class="flex-1 cursor-pointer">
362
+ <input type="radio" name="reportType" value="lost" class="peer sr-only" checked>
363
+ <div class="text-center py-2 rounded-lg border border-white/10 bg-white/5 text-slate-300 peer-checked:bg-rose-500/20 peer-checked:border-rose-500/50 peer-checked:text-rose-400 transition-all">Lost</div>
364
+ </label>
365
+ <label class="flex-1 cursor-pointer">
366
+ <input type="radio" name="reportType" value="found" class="peer sr-only">
367
+ <div class="text-center py-2 rounded-lg border border-white/10 bg-white/5 text-slate-300 peer-checked:bg-emerald-500/20 peer-checked:border-emerald-500/50 peer-checked:text-emerald-400 transition-all">Found</div>
368
+ </label>
369
+ </div>
370
+ </div>
371
+ <div class="space-y-1">
372
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Category</label>
373
+ <select name="category" class="w-full bg-slate-800/50 border border-white/10 rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
374
+ <option value="electronics">Electronics</option>
375
+ <option value="accessories">Accessories</option>
376
+ <option value="documents">Documents</option>
377
+ <option value="other">Other</option>
378
+ </select>
379
+ </div>
380
+ </div>
381
+
382
+ <div class="space-y-1">
383
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Title</label>
384
+ <input type="text" name="title" required class="w-full bg-slate-800/50 border border-white/10 rounded-lg px-3 py-2 text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="e.g. Black Leather Wallet">
385
+ </div>
386
+
387
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
388
+ <div class="space-y-1">
389
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Location</label>
390
+ <input type="text" name="location" required class="w-full bg-slate-800/50 border border-white/10 rounded-lg px-3 py-2 text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="e.g. Library, 2nd Floor">
391
+ </div>
392
+ <div class="space-y-1">
393
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Date</label>
394
+ <input type="date" name="date" required class="w-full bg-slate-800/50 border border-white/10 rounded-lg px-3 py-2 text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500">
395
+ </div>
396
+ </div>
397
+
398
+ <div class="space-y-1">
399
+ <label class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Description</label>
400
+ <textarea name="description" rows="3" class="w-full bg-slate-800/50 border border-white/10 rounded-lg px-3 py-2 text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500" placeholder="Provide specific details to help identify the item..."></textarea>
401
+ </div>
402
+
403
+ <div class="pt-4 flex justify-end gap-3">
404
+ <button type="button" onclick="closeReportModal()" class="px-4 py-2 rounded-lg text-slate-300 hover:text-white hover:bg-white/5 transition-colors">Cancel</button>
405
+ <button type="submit" class="px-6 py-2 bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg font-medium shadow-lg shadow-indigo-500/25 transition-all transform hover:scale-105">Submit Report</button>
406
+ </div>
407
+ </form>
408
+ </div>
409
+ </div>
410
+ </div>
411
+
412
+ <script>
413
+ // Sample Data
414
+ const initialItems = [
415
+ {
416
+ id: 1,
417
+ title: "MacBook Pro 16-inch",
418
+ type: "lost",
419
+ category: "electronics",
420
+ location: "Student Center, Table 4",
421
+ date: "2023-10-24",
422
+ description: "Space Grey MacBook Pro in a black leather sleeve. Has several stickers on the lid (VS Code, React).",
423
+ image: "https://images.unsplash.com/photo-1517336714731-489689fd1ca4?auto=format&fit=crop&q=80&w=800",
424
+ status: "active"
425
+ },
426
+ {
427
+ id: 2,
428
+ title: "Set of Keys with Lego Keychain",
429
+ type: "found",
430
+ category: "accessories",
431
+ location: "Parking Lot B",
432
+ date: "2023-10-25",
433
+ description: "Found near the bike racks. Keys include a car key (Toyota), house keys, and a distinctive red lego brick keychain.",
434
+ image: "https://images.unsplash.com/photo-1582140162633-599835349ce1?auto=format&fit=crop&q=80&w=800",
435
+ status: "active"
436
+ },
437
+ {
438
+ id: 3,
439
+ title: "Blue Backpack (Nike)",
440
+ type: "lost",
441
+ category: "accessories",
442
+ location: "Gym Locker Room",
443
+ date: "2023-10-23",
444
+ description: "Navy blue Nike backpack. Contains gym clothes, a water bottle, and a wallet (brown leather).",
445
+ image: "https://images.unsplash.com/photo-1553062407-98eeb64c6a62?auto=format&fit=crop&q=80&w=800",
446
+ status: "active"
447
+ },
448
+ {
449
+ id: 4,
450
+ title: "Prescription Glasses (Black Frame)",
451
+ type: "found",
452
+ category: "accessories",
453
+ location: "Lecture Hall A",
454
+ date: "2023-10-26",
455
+ description: "Found on the floor near the back row. Black thick-rimmed glasses in a hard shell case.",
456
+ image: "https://images.unsplash.com/photo-1591076482161-42ce6da69f67?auto=format&fit=crop&q=80&w=800",
457
+ status: "active"
458
+ },
459
+ {
460
+ id: 5,
461
+ title: "iPhone 13 Pro (Sierra Blue)",
462
+ type: "lost",
463
+ category: "electronics",
464
+ location: "Cafeteria",
465
+ date: "2023-10-25",
466
+ description: "Lost on one of the tables near the window. Has a clear case with a photo inside.",
467
+ image: "https://images.unsplash.com/photo-1632661674596-df8be070a5c5?auto=format&fit=crop&q=80&w=800",
468
+ status: "active"
469
+ },
470
+ {
471
+ id: 6,
472
+ title: "Student ID Card",
473
+ type: "found",
474
+ category: "documents",
475
+ location: "Library Front Desk",
476
+ date: "2023-10-26",
477
+ description: "Turned in by a staff member. Name: Sarah Jenkins. ID Number: 8839201.",
478
+ image: "https://images.unsplash.com/photo-1589829085413-56de8ae18c73?auto=format&fit=crop&q=80&w=800",
479
+ status: "active"
480
+ },
481
+ {
482
+ id: 7,
483
+ title: "Wireless Mouse (Logitech)",
484
+ type: "lost",
485
+ category: "electronics",
486
+ location: "Computer Lab 3",
487
+ date: "2023-10-24",
488
+ description: "Black Logitech MX Master 3. Left behind after a late night study session.",
489
+ image: "https://images.unsplash.com/photo-1527864550417-7fd91fc51a46?auto=format&fit=crop&q=80&w=800",
490
+ status: "active"
491
+ },
492
+ {
493
+ id: 8,
494
+ title: "Water Bottle (Hydro Flask)",
495
+ type: "found",
496
+ category: "other",
497
+ location: "Soccer Field",
498
+ date: "2023-10-25",
499
+ description: "Blue 32oz Hydro Flask with various stickers on it.",
500
+ image: "https://images.unsplash.com/photo-1602143407151-7111542de6e8?auto=format&fit=crop&q=80&w=800",
501
+ status: "active"
502
+ }
503
+ ];
504
+
505
+ let items = [...initialItems];
506
+ let currentFilter = 'all';
507
+ let isListView = false;
508
+
509
+ // Initialization
510
+ document.addEventListener('DOMContentLoaded', () => {
511
+ renderItems();
512
+
513
+ // Search listener
514
+ document.getElementById('searchInput').addEventListener('input', (e) => {
515
+ const term = e.target.value.toLowerCase();
516
+ const filtered = items.filter(item =>
517
+ item.title.toLowerCase().includes(term) ||
518
+ item.location.toLowerCase().includes(term) ||
519
+ item.description.toLowerCase().includes(term)
520
+ );
521
+ renderItems(filtered);
522
+ });
523
+ });
524
+
525
+ // Render Function
526
+ function renderItems(data = items) {
527
+ const container = document.getElementById('itemsContainer');
528
+ const emptyState = document.getElementById('emptyState');
529
+
530
+ container.innerHTML = '';
531
+
532
+ // Apply category filter
533
+ let displayData = data;
534
+ if (currentFilter !== 'all') {
535
+ displayData = data.filter(item => item.category === currentFilter);
536
+ }
537
+
538
+ if (displayData.length === 0) {
539
+ container.classList.add('hidden');
540
+ emptyState.classList.remove('hidden');
541
+ emptyState.classList.add('flex');
542
+ return;
543
+ }
544
+
545
+ container.classList.remove('hidden');
546
+ emptyState.classList.add('hidden');
547
+ emptyState.classList.remove('flex');
548
+
549
+ displayData.forEach((item, index) => {
550
+ const card = document.createElement('div');
551
+ card.className = `glass-panel rounded-2xl overflow-hidden hover:transform hover:scale-[1.02] transition-all duration-300 group cursor-pointer border border-white/5 hover:border-white/20 flex flex-col h-full animate-slide-up`;
552
+ card.style.animationDelay = `${index * 50}ms`;
553
+ card.onclick = () => openModal(item);
554
+
555
+ const typeColor = item.type === 'lost' ? 'text-rose-400 bg-rose-500/10 border-rose-500/20' : 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20';
556
+ const typeIcon = item.type === 'lost' ? 'fa-circle-xmark' : 'fa-circle-check';
557
+ const typeLabel = item.type === 'lost' ? 'Lost' : 'Found';
558
+
559
+ card.innerHTML = `
560
+ <div class="relative h-48 overflow-hidden">
561
+ <img src="${item.image}" alt="${item.title}" class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-110">
562
+ <div class="absolute top-3 left-3">
563
+ <span class="px-2 py-1 rounded-md text-xs font-bold border ${typeColor} backdrop-blur-md flex items-center gap-1.5">
564
+ <i class="fa-solid ${typeIcon}"></i> ${typeLabel}
565
+ </span>
566
+ </div>
567
+ <div class="absolute bottom-0 left-0 right-0 h-24 bg-gradient-to-t from-slate-900 to-transparent"></div>
568
+ </div>
569
+ <div class="p-5 flex flex-col flex-grow">
570
+ <div class="flex justify-between items-start mb-2">
571
+ <h3 class="text-lg font-bold text-white line-clamp-1 group-hover:text-indigo-400 transition-colors">${item.title}</h3>
572
+ </div>
573
+ <p class="text-sm text-slate-400 line-clamp-2 mb-4 flex-grow">${item.description}</p>
574
+
575
+ <div class="flex items-center gap-4 text-xs text-slate-500 mt-auto pt-4 border-t border-white/5">
576
+ <div class="flex items-center gap-1.5">
577
+ <i class="fa-solid fa-location-dot text-indigo-400"></i>
578
+ <span class="truncate max-w-[80px]">${item.location}</span>
579
+ </div>
580
+ <div class="flex items-center gap-1.5 ml-auto">
581
+ <i class="fa-regular fa-calendar text-indigo-400"></i>
582
+ <span>${new Date(item.date).toLocaleDateString('en-US', { month: 'short', day: 'numeric' })}</span>
583
+ </div>
584
+ </div>
585
+ </div>
586
+ `;
587
+ container.appendChild(card);
588
+ });
589
+ }
590
+
591
+ // Filter Logic
592
+ function filterItems(category) {
593
+ currentFilter = category;
594
+
595
+ // Update UI
596
+ document.querySelectorAll('.filter-btn').forEach(btn => {
597
+ if (btn.dataset.filter === category) {
598
+ btn.classList.add('bg-white/10', 'text-white', 'border-white/10');
599
+ btn.classList.remove('text-slate-400');
600
+ } else {
601
+ btn.classList.remove('bg-white/10', 'text-white', 'border-white/10');
602
+ btn.classList.add('text-slate-400');
603
+ }
604
+ });
605
+
606
+ const searchTerm = document.getElementById('searchInput').value.toLowerCase();
607
+ let filtered = items;
608
+
609
+ if (searchTerm) {
610
+ filtered = items.filter(item =>
611
+ item.title.toLowerCase().includes(searchTerm) ||
612
+ item.location.toLowerCase().includes(searchTerm)
613
+ );
614
+ }
615
+
616
+ renderItems(filtered);
617
+ }
618
+
619
+ // Modal Logic
620
+ function openModal(item) {
621
+ const modal = document.getElementById('itemModal');
622
+
623
+ // Populate data
624
+ document.getElementById('modalImage').src = item.image;
625
+ document.getElementById('modalTitle').textContent = item.title;
626
+ document.getElementById('modalCategory').textContent = item.category.charAt(0).toUpperCase() + item.category.slice(1);
627
+ document.getElementById('modalLocation').textContent = item.location;
628
+ document.getElementById('modalDate').textContent = new Date(item.date).toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric' });
629
+ document.getElementById('modalDesc').textContent = item.description;
630
+
631
+ const typeBadge = document.getElementById('modalType');
632
+ if (item.type === 'lost') {
633
+ typeBadge.className = 'absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-bold bg-rose-500 text-white shadow-lg';
634
+ typeBadge.innerHTML = '<i class="fa-solid fa-circle-xmark mr-1"></i> Lost';
635
+ } else {
636
+ typeBadge.className = 'absolute bottom-4 left-4 px-3 py-1 rounded-full text-xs font-bold bg-emerald-500 text-white shadow-lg';
637
+ typeBadge.innerHTML = '<i class="fa-solid fa-circle-check mr-1"></i> Found';
638
+ }
639
+
640
+ modal.classList.remove('hidden');
641
+ modal.classList.add('flex');
642
+ document.body.style.overflow = 'hidden'; // Prevent background scrolling
643
+ }
644
+
645
+ function closeModal() {
646
+ const modal = document.getElementById('itemModal');
647
+ modal.classList.add('hidden');
648
+ modal.classList.remove('flex');
649
+ document.body.style.overflow = 'auto';
650
+ }
651
+
652
+ // Report Modal Logic
653
+ function openReportModal() {
654
+ document.getElementById('reportModal').classList.remove('hidden');
655
+ document.getElementById('reportModal').classList.add('flex');
656
+ }
657
+
658
+ function closeReportModal() {
659
+ document.getElementById('reportModal').classList.add('hidden');
660
+ document.getElementById('reportModal').classList.remove('flex');
661
+ }
662
+
663
+ function handleReport(e) {
664
+ e.preventDefault();
665
+ const formData = new FormData(e.target);
666
+
667
+ const newItem = {
668
+ id: items.length + 1,
669
+ title: formData.get('title'),
670
+ type: formData.get('reportType'),
671
+ category: formData.get('category'),
672
+ location: formData.get('location'),
673
+ date: formData.get('date'),
674
+ description: formData.get('description'),
675
+ // Random image based on category for demo
676
+ image: `https://source.unsplash.com/random/800x600/?${formData.get('category')},object`,
677
+ status: "active"
678
+ };
679
+
680
+ // Since unsplash source is deprecated/unreliable, use placeholders or specific images
681
+ // Let's use specific images for the demo to ensure they look good
682
+ const categoryImages = {
683
+ 'electronics': 'https://images.unsplash.com/photo-1496181133206-80ce9b88a853?auto=format&fit=crop&q=80&w=800',
684
+ 'accessories': 'https://images.unsplash.com/photo-1523293188086-b15e4af37de9?auto=format&fit=crop&q=80&w=800',
685
+ 'documents': 'https://images.unsplash.com/photo-1618044733300-9472054094ee?auto=format&fit=crop&q=80&w=800',
686
+ 'other': 'https://images.unsplash.com/photo-1516962215378-7fa2e137ae91?auto=format&fit=crop&q=80&w=800'
687
+ };
688
+ newItem.image = categoryImages[newItem.category] || categoryImages['other'];
689
+
690
+ items.unshift(newItem); // Add to top
691
+
692
+ // Reset and Close
693
+ e.target.reset();
694
+ closeReportModal();
695
+
696
+ // Update UI
697
+ renderItems();
698
+
699
+ // Show success notification (simple alert for now, could be toast)
700
+ // alert('Item reported successfully!');
701
+ }
702
+
703
+ function scrollToItems() {
704
+ document.getElementById('itemsContainer').scrollIntoView({ behavior: 'smooth', block: 'start' });
705
+ }
706
+
707
+ function toggleView() {
708
+ // Placeholder for list view toggle logic
709
+ alert("List view toggle coming soon!");
710
+ }
711
+
712
+ // Close modals on Escape key
713
+ document.addEventListener('keydown', (e) => {
714
+ if (e.key === 'Escape') {
715
+ closeModal();
716
+ closeReportModal();
717
+ }
718
+ });
719
+
720
+ </script>
721
+ </body>
722
+ </html>