File size: 15,596 Bytes
dd2fa53 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Custom CSS for elements that need more precise styling */
.gradient-bg {
background: linear-gradient(135deg, #6e8efb, #a777e3);
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.chart-container {
position: relative;
height: 300px;
}
.sidebar {
transition: all 0.3s ease;
overflow: hidden;
}
.sidebar-collapsed {
width: 5rem !important;
}
.sidebar-expanded {
width: 16rem !important;
}
.sidebar-item-text {
transition: opacity 0.3s ease;
}
.sidebar-collapsed .sidebar-item-text {
opacity: 0;
width: 0;
display: none;
}
.sidebar-collapsed .sidebar-badge {
display: none;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn {
animation: fadeIn 0.5s ease-out forwards;
}
.toggle-btn {
transition: all 0.3s ease;
}
.toggle-btn:hover {
transform: scale(1.1);
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div id="sidebar" class="sidebar bg-white w-64 sidebar-expanded flex-shrink-0 shadow-lg relative">
<div class="p-4 flex items-center justify-between">
<span class="text-xl font-bold text-purple-600 sidebar-item-text">DashboardPro</span>
<button id="toggleSidebar" class="toggle-btn text-gray-500 hover:text-purple-600">
<i class="fas fa-bars"></i>
</button>
</div>
<nav class="mt-6">
<div class="px-4">
<div class="py-2 px-3 flex items-center rounded-lg bg-purple-50 text-purple-600 mb-2">
<i class="fas fa-home mr-3"></i>
<span class="sidebar-item-text">Dashboard</span>
</div>
<div class="py-2 px-3 flex items-center rounded-lg hover:bg-purple-50 text-gray-600 hover:text-purple-600 mb-2">
<i class="fas fa-chart-line mr-3"></i>
<span class="sidebar-item-text">Analytics</span>
</div>
<div class="py-2 px-3 flex items-center rounded-lg hover:bg-purple-50 text-gray-600 hover:text-purple-600 mb-2">
<i class="fas fa-envelope mr-3"></i>
<span class="sidebar-item-text">Messages</span>
<span class="ml-auto bg-red-500 text-white text-xs px-2 py-1 rounded-full sidebar-badge">5</span>
</div>
<div class="py-2 px-3 flex items-center rounded-lg hover:bg-purple-50 text-gray-600 hover:text-purple-600 mb-2">
<i class="fas fa-calendar mr-3"></i>
<span class="sidebar-item-text">Calendar</span>
</div>
<div class="py-2 px-3 flex items-center rounded-lg hover:bg-purple-50 text-gray-600 hover:text-purple-600 mb-2">
<i class="fas fa-cog mr-3"></i>
<span class="sidebar-item-text">Settings</span>
</div>
</div>
</nav>
<div class="absolute bottom-0 w-full p-4 border-t border-gray-200">
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full">
<div class="ml-3 sidebar-item-text">
<p class="text-sm font-medium text-gray-800">Sarah Johnson</p>
<p class="text-xs text-gray-500">Admin</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Top Navigation -->
<header class="bg-white shadow-sm">
<div class="flex items-center justify-between px-6 py-4">
<div class="flex items-center">
<button id="mobileToggleSidebar" class="mr-4 text-gray-500 md:hidden">
<i class="fas fa-bars"></i>
</button>
<h1 class="text-2xl font-semibold text-gray-800">Dashboard Overview</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200">
<i class="fas fa-bell"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</button>
<div class="flex items-center">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-10 h-10 rounded-full">
<span class="ml-2 hidden md:inline">Sarah Johnson</span>
</div>
</div>
</div>
</header>
<!-- Main Content Area -->
<main class="p-6">
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-sm p-6 card-hover animate-fadeIn" style="animation-delay: 0.1s;">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-blue-100 text-blue-600">
<i class="fas fa-users text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Total Users</p>
<p class="text-2xl font-semibold text-gray-800">2,453</p>
</div>
</div>
<div class="mt-4">
<span class="text-green-500 text-sm font-medium">+12% from last month</span>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6 card-hover animate-fadeIn" style="animation-delay: 0.2s;">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-purple-100 text-purple-600">
<i class="fas fa-shopping-cart text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Total Orders</p>
<p class="text-2xl font-semibold text-gray-800">1,287</p>
</div>
</div>
<div class="mt-4">
<span class="text-green-500 text-sm font-medium">+8% from last month</span>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6 card-hover animate-fadeIn" style="animation-delay: 0.3s;">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-green-100 text-green-600">
<i class="fas fa-dollar-sign text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Revenue</p>
<p class="text-2xl font-semibold text-gray-800">$34,546</p>
</div>
</div>
<div class="mt-4">
<span class="text-red-500 text-sm font-medium">-3% from last month</span>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6 card-hover animate-fadeIn" style="animation-delay: 0.4s;">
<div class="flex items-center">
<div class="p-3 rounded-lg bg-yellow-100 text-yellow-600">
<i class="fas fa-chart-pie text-xl"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Conversion Rate</p>
<p class="text-2xl font-semibold text-gray-800">3.6%</p>
</div>
</div>
<div class="mt-4">
<span class="text-green-500 text-sm font-medium">+1.2% from last month</span>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
<div class="flex items-center justify-between mb-6">
<h2 class="text-lg font-semibold text-gray-800">Sales Overview</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 text-sm bg-purple-100 text-purple-600 rounded-lg">Month</button>
<button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg">Week</button>
<button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded-lg">Day</button>
</div>
</div>
<div class="chart-container">
<canvas id="salesChart"></canvas>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Traffic Sources</h2>
<div class="chart-container">
<canvas id="trafficChart"></canvas>
</div>
<div class="mt-4 grid grid-cols-2 gap-4">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-blue-500 mr-2"></div>
<span class="text-sm text-gray-600">Direct</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-purple-500 mr-2"></div>
<span class="text-sm text-gray-600">Organic</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-600">Referral</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
<span class="text-sm text-gray-600">Social</span>
</div>
</div>
</div>
</div>
<!-- Recent Orders and Activity Feed -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="bg-white rounded-xl shadow-sm p-6 lg:col-span-2">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Recent Orders</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Order ID</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Customer</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
<th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-0001</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">John Smith</td>
<td class="px-4 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">Completed</span>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">$245.00</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td>
</tr>
<tr>
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-0002</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">Emma Johnson</td>
<td class="px-4 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">Processing</span>
</td>
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">$189.00</td>
<td class="px-4 py-4 whites
</html> |