Spaces:
Running
Running
| <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> | |