Spaces:
Running
Running
File size: 18,683 Bytes
c738c07 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard - MessageHub</title>
<link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>💬</text></svg>">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.sidebar-item {
transition: all 0.3s ease;
}
.sidebar-item:hover {
background: rgba(147, 51, 234, 0.1);
border-left: 4px solid #9333ea;
}
.sidebar-item.active {
background: rgba(147, 51, 234, 0.2);
border-left: 4px solid #9333ea;
}
.message-bubble {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.device-card {
transition: all 0.3s ease;
}
.device-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}
</style>
</head>
<body class="bg-gray-900 text-white">
<!-- Sidebar -->
<div class="fixed inset-y-0 left-0 z-50 w-64 bg-gray-800 transform transition-transform duration-300 ease-in-out" id="sidebar">
<div class="flex items-center justify-between p-6 border-b border-gray-700">
<div class="flex items-center space-x-2">
<i data-feather="message-square" class="w-6 h-6 text-purple-400"></i>
<span class="text-xl font-bold">MessageHub</span>
</div>
<button class="md:hidden" id="close-sidebar">
<i data-feather="x" class="w-5 h-5"></i>
</button>
</div>
<nav class="p-4">
<div class="space-y-2">
<a href="#" class="sidebar-item active flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="home" class="w-5 h-5"></i>
<span>Dashboard</span>
</a>
<a href="#" class="sidebar-item flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="smartphone" class="w-5 h-5"></i>
<span>Devices</span>
</a>
<a href="#" class="sidebar-item flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="message-circle" class="w-5 h-5"></i>
<span>Messages</span>
</a>
<a href="#" class="sidebar-item flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="phone" class="w-5 h-5"></i>
<span>Calls</span>
</a>
<a href="#" class="sidebar-item flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="image" class="w-5 h-5"></i>
<span>Media</span>
</a>
<a href="#" class="sidebar-item flex items-center space-x-3 p-3 rounded-lg cursor-pointer">
<i data-feather="settings" class="w-5 h-5"></i>
<span>Settings</span>
</a>
</div>
</nav>
<div class="absolute bottom-0 w-full p-4 border-t border-gray-700">
<div class="flex items-center space-x-3">
<img src="http://static.photos/people/200x200/1" alt="User" class="w-10 h-10 rounded-full">
<div>
<p class="text-sm font-semibold">John Doe</p>
<p class="text-xs text-gray-400">Premium Plan</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="md:ml-64 min-h-screen">
<!-- Header -->
<header class="bg-gray-800 p-6 border-b border-gray-700">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<button class="md:hidden" id="open-sidebar">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
<h1 class="text-2xl font-bold">Dashboard</h1>
</div>
<div class="flex items-center space-x-4">
<button class="relative">
<i data-feather="bell" class="w-6 h-6"></i>
<span class="absolute -top-1 -right-1 bg-red-500 text-xs rounded-full w-5 h-5 flex items-center justify-center">3</span>
</button>
<button class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-lg flex items-center space-x-2 transition-colors">
<i data-feather="plus" class="w-4 h-4"></i>
<span>Add Device</span>
</button>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-6">
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="100">
<div class="flex items-center justify-between mb-4">
<div class="bg-purple-600 p-3 rounded-lg">
<i data-feather="smartphone" class="w-6 h-6"></i>
</div>
<span class="text-green-400 text-sm">+2 new</span>
</div>
<h3 class="text-3xl font-bold mb-1">5</h3>
<p class="text-gray-400">Connected Devices</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="200">
<div class="flex items-center justify-between mb-4">
<div class="bg-blue-600 p-3 rounded-lg">
<i data-feather="message-circle" class="w-6 h-6"></i>
</div>
<span class="text-green-400 text-sm">+142</span>
</div>
<h3 class="text-3xl font-bold mb-1">1,234</h3>
<p class="text-gray-400">Total Messages</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="300">
<div class="flex items-center justify-between mb-4">
<div class="bg-green-600 p-3 rounded-lg">
<i data-feather="phone" class="w-6 h-6"></i>
</div>
<span class="text-green-400 text-sm">+18</span>
</div>
<h3 class="text-3xl font-bold mb-1">89</h3>
<p class="text-gray-400">Calls Today</p>
</div>
<div class="bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="400">
<div class="flex items-center justify-between mb-4">
<div class="bg-yellow-600 p-3 rounded-lg">
<i data-feather="users" class="w-6 h-6"></i>
</div>
<span class="text-green-400 text-sm">Online</span>
</div>
<h3 class="text-3xl font-bold mb-1">24</h3>
<p class="text-gray-400">Active Contacts</p>
</div>
</div>
<!-- Connected Devices -->
<div class="mb-8">
<h2 class="text-2xl font-bold mb-6" data-aos="fade-up">Connected Devices</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="device-card bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="100">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center space-x-3">
<i data-feather="smartphone" class="w-8 h-8 text-purple-400"></i>
<div>
<h3 class="font-semibold">iPhone 13 Pro</h3>
<p class="text-sm text-gray-400">John's Phone</p>
</div>
</div>
<span class="w-3 h-3 bg-green-400 rounded-full"></span>
</div>
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<span class="text-gray-400">Last sync:</span>
<span>2 min ago</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Messages:</span>
<span>423</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Calls:</span>
<span>56</span>
</div>
</div>
</div>
<div class="device-card bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="200">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center space-x-3">
<i data-feather="tablet" class="w-8 h-8 text-blue-400"></i>
<div>
<h3 class="font-semibold">iPad Air</h3>
<p class="text-sm text-gray-400">Family iPad</p>
</div>
</div>
<span class="w-3 h-3 bg-green-400 rounded-full"></span>
</div>
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<span class="text-gray-400">Last sync:</span>
<span>5 min ago</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Messages:</span>
<span>267</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Calls:</span>
<span>0</span>
</div>
</div>
</div>
<div class="device-card bg-gray-800 p-6 rounded-xl border border-gray-700" data-aos="fade-up" data-aos-delay="300">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center space-x-3">
<i data-feather="smartphone" class="w-8 h-8 text-green-400"></i>
<div>
<h3 class="font-semibold">Galaxy S23</h3>
<p class="text-sm text-gray-400">Work Phone</p>
</div>
</div>
<span class="w-3 h-3 bg-yellow-400 rounded-full"></span>
</div>
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<span class="text-gray-400">Last sync:</span>
<span>15 min ago</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Messages:</span>
<span>544</span>
</div>
<div class="flex justify-between">
<span class="text-gray-400">Calls:</span>
<span>33</span>
</div>
</div>
</div>
</div>
</div>
<!-- Recent Messages -->
<div class="bg-gray-800 rounded-xl border border-gray-700 p-6" data-aos="fade-up">
<div class="flex items-center justify-between mb-6">
<h2 class="text-2xl font-bold">Recent Messages</h2>
<a href="#" class="text-purple-400 hover:text-purple-300 flex items-center space-x-1">
<span>View All</span>
<i data-feather="arrow-right" class="w-4 h-4"></i>
</a>
</div>
<div class="space-y-4">
<div class="message-bubble flex items-start space-x-4 p-4 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors cursor-pointer">
<img src="http://static.photos/people/200x200/2" alt="Contact" class="w-12 h-12 rounded-full">
<div class="flex-1">
<div class="flex items-center justify-between mb-1">
<h4 class="font-semibold">Sarah Johnson</h4>
<span class="text-sm text-gray-400">2 min ago</span>
</div>
<p class="text-gray-300">Hey! Are we still on for dinner tonight? I was thinking about trying that new Italian place downtown.</p>
<div class="flex items-center space-x-4 mt-2 text-sm text-gray-400">
<span><i data-feather="smartphone" class="w-4 h-4 inline mr-1"></i>iPhone 13 Pro</span>
<span><i data-feather="check" class="w-4 h-4 inline mr-1"></i>Read</span>
</div>
</div>
</div>
<div class="message-bubble flex items-start space-x-4 p-4 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors cursor-pointer">
<img src="http://static.photos/people/200x200/3" alt="Contact" class="w-12 h-12 rounded-full">
<div class="flex-1">
<div class="flex items-center justify-between mb-1">
<h4 class="font-semibold">Mike Chen</h4>
<span class="text-sm text-gray-400">15 min ago</span>
</div>
<p class="text-gray-300">The project files are ready. Can you review them before the meeting tomorrow?</p>
<div class="flex items-center space-x-4 mt-2 text-sm text-gray-400">
<span><i data-feather="smartphone" class="w-4 h-4 inline mr-1"></i>Galaxy S23</span>
<span><i data-feather="check" class="w-4 h-4 inline mr-1"></i>Delivered</span>
</div>
</div>
</div>
<div class="message-bubble flex items-start space-x-4 p-4 bg-gray-700 rounded-lg hover:bg-gray-600 transition-colors cursor-pointer">
<img src="http://static.photos/people/200x200/4" alt="Contact" class="w-12 h-12 rounded-full">
<div class="flex-1">
<div class="flex items-center justify-between mb-1">
<h4 class="font-semibold">Emma Wilson</h4>
<span class="text-sm text-gray-400">1 hour ago</span>
</div>
<p class="text-gray-300">Thanks for your help today! The presentation went really well 🎉</p>
<div class="flex items-center space-x-4 mt-2 text-sm text-gray-400">
<span><i data-feather="tablet" class="w-4 h-4 inline mr-1"></i>iPad Air</span>
<span><i data-feather="check" class="w-4 h-4 inline mr-1"></i>Read</span>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
// Sidebar toggle
const sidebar = document.getElementById('sidebar');
const openSidebarBtn = document.getElementById('open-sidebar');
const closeSidebarBtn = document.getElementById('close-sidebar');
openSidebarBtn.addEventListener('click', () => {
sidebar.classList.remove('-translate-x-full');
});
closeSidebarBtn.addEventListener('click', () => {
sidebar.classList.add('-translate-x-full');
});
// Sidebar navigation
const sidebarItems = document.querySelectorAll('.sidebar-item');
sidebarItems.forEach(item => {
item.addEventListener('click', () => {
sidebarItems.forEach(i => i.classList.remove('active'));
item.classList.add('active');
});
});
// Initialize AOS
AOS.init({
duration: 800,
once: true
});
// Initialize Feather Icons
feather.replace();
// Simulate real-time updates
setInterval(() => {
const stats = document.querySelectorAll('.text-3xl.font-bold');
stats.forEach(stat => {
if (stat.textContent.includes('+')) return;
const currentValue = parseInt(stat.textContent);
stat.textContent = currentValue + Math.floor(Math.random() * 3);
});
}, 5000);
</script>
</body>
</html>
|