-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdashboard.html
More file actions
394 lines (382 loc) · 24.1 KB
/
dashboard.html
File metadata and controls
394 lines (382 loc) · 24.1 KB
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Management - Dashboard</title>
<!-- Include Tailwind CSS via CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ['Poppins', 'sans-serif'],
},
boxShadow: {
'custom': '0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
},
}
}
}
</script>
<style>
.bg-gradient {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}
.animate-fade-in {
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body class="bg-gradient-to-br from-gray-900 to-gray-800 min-h-screen flex flex-col">
<!-- Header with right-aligned menu -->
<header class="bg-gradient shadow-lg">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<a href="dashboard.html" class="flex items-center hover:opacity-90 transition-opacity duration-200">
<i class="fas fa-address-book text-white text-2xl mr-3"></i>
<div class="text-white font-bold text-xl">Contact Management</div>
</a>
<nav>
<ul class="flex space-x-6">
<li>
<a href="profile.html" class="text-gray-100 hover:text-white flex items-center transition-colors duration-200">
<i class="fas fa-user-circle mr-2"></i>
<span>Profile</span>
</a>
</li>
<li>
<a href="index.html" class="text-gray-100 hover:text-white flex items-center transition-colors duration-200">
<i class="fas fa-sign-out-alt mr-2"></i>
<span>Logout</span>
</a>
</li>
</ul>
</nav>
</div>
</header>
<!-- Main content -->
<main class="container mx-auto px-4 py-8 flex-grow">
<div class="flex items-center mb-6">
<i class="fas fa-users text-blue-400 text-2xl mr-3"></i>
<h1 class="text-2xl font-bold text-white">My Contacts</h1>
</div>
<!-- Search form -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 p-6 mb-8 animate-fade-in">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center">
<i class="fas fa-search text-blue-400 mr-3"></i>
<h2 class="text-xl font-semibold text-white">Search Contacts</h2>
</div>
<button type="button" id="toggleSearchForm" class="text-gray-300 hover:text-white hover:bg-gray-700 p-2 rounded-full focus:outline-none transition-all duration-200">
<i class="fas fa-chevron-down text-lg" id="toggleSearchIcon"></i>
</button>
</div>
<div id="searchFormContent" class="mt-4">
<form>
<div class="grid grid-cols-1 md:grid-cols-3 gap-5">
<div>
<label for="search_name" class="block text-gray-300 text-sm font-medium mb-2">Name</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-user text-gray-500"></i>
</div>
<input type="text" id="search_name" name="search_name"
class="w-full pl-10 pr-3 py-3 bg-gray-700 bg-opacity-50 border border-gray-600 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200"
placeholder="Search by name">
</div>
</div>
<div>
<label for="search_email" class="block text-gray-300 text-sm font-medium mb-2">Email</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-envelope text-gray-500"></i>
</div>
<input type="text" id="search_email" name="search_email"
class="w-full pl-10 pr-3 py-3 bg-gray-700 bg-opacity-50 border border-gray-600 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200"
placeholder="Search by email">
</div>
</div>
<div>
<label for="search_phone" class="block text-gray-300 text-sm font-medium mb-2">Phone</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-phone text-gray-500"></i>
</div>
<input type="text" id="search_phone" name="search_phone"
class="w-full pl-10 pr-3 py-3 bg-gray-700 bg-opacity-50 border border-gray-600 text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200"
placeholder="Search by phone">
</div>
</div>
</div>
<div class="mt-5 text-right">
<button type="submit"
class="px-5 py-3 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-lg transform hover:-translate-y-0.5">
<i class="fas fa-search mr-2"></i> Search
</button>
</div>
</form>
</div>
</div>
<!-- Contact cards grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Create New Contact Card -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom overflow-hidden border-2 border-dashed border-gray-700 card-hover animate-fade-in">
<a href="create_contact.html" class="block p-6 h-full">
<div class="flex flex-col items-center justify-center h-full text-center">
<div class="w-20 h-20 bg-gradient rounded-full flex items-center justify-center mb-5 shadow-lg transform transition-transform duration-300 hover:scale-110">
<i class="fas fa-user-plus text-3xl text-white"></i>
</div>
<h2 class="text-xl font-semibold text-white mb-3">Create New Contact</h2>
<p class="text-gray-300">Add a new contact to your list</p>
</div>
</a>
</div>
<!-- Contact Card 1 -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 overflow-hidden card-hover animate-fade-in">
<div class="p-6">
<a href="detail_contact.html" class="block cursor-pointer hover:bg-gray-700 rounded-lg transition-all duration-200 p-3">
<div class="flex items-center mb-3">
<div class="w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center mr-3 shadow-md">
<i class="fas fa-user text-white"></i>
</div>
<h2 class="text-xl font-semibold text-white hover:text-blue-300 transition-colors duration-200">John Doe</h2>
</div>
<div class="space-y-3 text-gray-300 ml-2">
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">First Name:</span>
<span>John</span>
</p>
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">Last Name:</span>
<span>Doe</span>
</p>
<p class="flex items-center">
<i class="fas fa-envelope text-gray-500 w-6"></i>
<span class="font-medium w-24">Email:</span>
<span>john.doe@example.com</span>
</p>
<p class="flex items-center">
<i class="fas fa-phone text-gray-500 w-6"></i>
<span class="font-medium w-24">Phone:</span>
<span>+1 (555) 123-4567</span>
</p>
</div>
</a>
<div class="mt-4 flex justify-end space-x-3">
<a href="edit_contact.html" class="px-4 py-2 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-edit mr-2"></i> Edit
</a>
<button class="px-4 py-2 bg-gradient-to-r from-red-600 to-red-500 text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-trash-alt mr-2"></i> Delete
</button>
</div>
</div>
</div>
<!-- Contact Card 2 -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 overflow-hidden card-hover animate-fade-in">
<div class="p-6">
<a href="detail_contact.html" class="block cursor-pointer hover:bg-gray-700 rounded-lg transition-all duration-200 p-3">
<div class="flex items-center mb-3">
<div class="w-10 h-10 bg-purple-500 rounded-full flex items-center justify-center mr-3 shadow-md">
<i class="fas fa-user text-white"></i>
</div>
<h2 class="text-xl font-semibold text-white hover:text-blue-300 transition-colors duration-200">Jane Smith</h2>
</div>
<div class="space-y-3 text-gray-300 ml-2">
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">First Name:</span>
<span>Jane</span>
</p>
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">Last Name:</span>
<span>Smith</span>
</p>
<p class="flex items-center">
<i class="fas fa-envelope text-gray-500 w-6"></i>
<span class="font-medium w-24">Email:</span>
<span>jane.smith@example.com</span>
</p>
<p class="flex items-center">
<i class="fas fa-phone text-gray-500 w-6"></i>
<span class="font-medium w-24">Phone:</span>
<span>+1 (555) 987-6543</span>
</p>
</div>
</a>
<div class="mt-4 flex justify-end space-x-3">
<a href="edit_contact.html" class="px-4 py-2 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-edit mr-2"></i> Edit
</a>
<button class="px-4 py-2 bg-gradient-to-r from-red-600 to-red-500 text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-trash-alt mr-2"></i> Delete
</button>
</div>
</div>
</div>
<!-- Contact Card 3 -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 overflow-hidden card-hover animate-fade-in">
<div class="p-6">
<a href="detail_contact.html" class="block cursor-pointer hover:bg-gray-700 rounded-lg transition-all duration-200 p-3">
<div class="flex items-center mb-3">
<div class="w-10 h-10 bg-green-500 rounded-full flex items-center justify-center mr-3 shadow-md">
<i class="fas fa-user text-white"></i>
</div>
<h2 class="text-xl font-semibold text-white hover:text-blue-300 transition-colors duration-200">Robert Johnson</h2>
</div>
<div class="space-y-3 text-gray-300 ml-2">
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">First Name:</span>
<span>Robert</span>
</p>
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">Last Name:</span>
<span>Johnson</span>
</p>
<p class="flex items-center">
<i class="fas fa-envelope text-gray-500 w-6"></i>
<span class="font-medium w-24">Email:</span>
<span>robert.j@example.com</span>
</p>
<p class="flex items-center">
<i class="fas fa-phone text-gray-500 w-6"></i>
<span class="font-medium w-24">Phone:</span>
<span>+1 (555) 456-7890</span>
</p>
</div>
</a>
<div class="mt-4 flex justify-end space-x-3">
<a href="edit_contact.html" class="px-4 py-2 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-edit mr-2"></i> Edit
</a>
<button class="px-4 py-2 bg-gradient-to-r from-red-600 to-red-500 text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-trash-alt mr-2"></i> Delete
</button>
</div>
</div>
</div>
<!-- Contact Card 4 -->
<div class="bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 overflow-hidden card-hover animate-fade-in">
<div class="p-6">
<a href="detail_contact.html" class="block cursor-pointer hover:bg-gray-700 rounded-lg transition-all duration-200 p-3">
<div class="flex items-center mb-3">
<div class="w-10 h-10 bg-pink-500 rounded-full flex items-center justify-center mr-3 shadow-md">
<i class="fas fa-user text-white"></i>
</div>
<h2 class="text-xl font-semibold text-white hover:text-blue-300 transition-colors duration-200">Emily Davis</h2>
</div>
<div class="space-y-3 text-gray-300 ml-2">
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">First Name:</span>
<span>Emily</span>
</p>
<p class="flex items-center">
<i class="fas fa-user-tag text-gray-500 w-6"></i>
<span class="font-medium w-24">Last Name:</span>
<span>Davis</span>
</p>
<p class="flex items-center">
<i class="fas fa-envelope text-gray-500 w-6"></i>
<span class="font-medium w-24">Email:</span>
<span>emily.davis@example.com</span>
</p>
<p class="flex items-center">
<i class="fas fa-phone text-gray-500 w-6"></i>
<span class="font-medium w-24">Phone:</span>
<span>+1 (555) 234-5678</span>
</p>
</div>
</a>
<div class="mt-4 flex justify-end space-x-3">
<a href="edit_contact.html" class="px-4 py-2 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-edit mr-2"></i> Edit
</a>
<button class="px-4 py-2 bg-gradient-to-r from-red-600 to-red-500 text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md flex items-center">
<i class="fas fa-trash-alt mr-2"></i> Delete
</button>
</div>
</div>
</div>
</div>
<!-- Pagination -->
<div class="mt-10 flex justify-center">
<nav class="flex items-center space-x-3 bg-gray-800 bg-opacity-80 rounded-xl shadow-custom border border-gray-700 p-3 animate-fade-in">
<a href="#" class="px-4 py-2 bg-gray-700 text-gray-300 rounded-lg hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 flex items-center">
<i class="fas fa-chevron-left mr-2"></i> Previous
</a>
<a href="#" class="px-4 py-2 bg-gradient text-white rounded-lg hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 font-medium shadow-md">
1
</a>
<a href="#" class="px-4 py-2 bg-gray-700 text-gray-300 rounded-lg hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200">
2
</a>
<a href="#" class="px-4 py-2 bg-gray-700 text-gray-300 rounded-lg hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200">
3
</a>
<a href="#" class="px-4 py-2 bg-gray-700 text-gray-300 rounded-lg hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800 transition-all duration-200 flex items-center">
Next <i class="fas fa-chevron-right ml-2"></i>
</a>
</nav>
</div>
<!-- Footer -->
<div class="mt-10 mb-6 text-center text-gray-400 text-sm animate-fade-in">
<p>© 2025 Contact Management. All rights reserved.</p>
</div>
</main>
<!-- JavaScript for toggle search form -->
<script>
document.addEventListener('DOMContentLoaded', function() {
const toggleButton = document.getElementById('toggleSearchForm');
const searchFormContent = document.getElementById('searchFormContent');
const toggleIcon = document.getElementById('toggleSearchIcon');
// Add transition for smooth animation
searchFormContent.style.transition = 'max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease-in-out';
searchFormContent.style.overflow = 'hidden';
searchFormContent.style.maxHeight = '0px';
searchFormContent.style.opacity = '0';
searchFormContent.style.marginTop = '0';
toggleButton.addEventListener('click', function() {
if (searchFormContent.style.maxHeight !== '0px') {
// Hide the form
searchFormContent.style.maxHeight = '0px';
searchFormContent.style.opacity = '0';
searchFormContent.style.marginTop = '0';
toggleIcon.classList.remove('fa-chevron-up');
toggleIcon.classList.add('fa-chevron-down');
} else {
// Show the form
searchFormContent.style.maxHeight = searchFormContent.scrollHeight + 'px';
searchFormContent.style.opacity = '1';
searchFormContent.style.marginTop = '1rem';
toggleIcon.classList.remove('fa-chevron-down');
toggleIcon.classList.add('fa-chevron-up');
}
});
});
</script>
</body>
</html>