Spaces:
Running
Running
File size: 16,777 Bytes
65adec4 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minimalist Analytics Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
animation: fadeIn 0.5s ease-out forwards;
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.transition-all {
transition: all 0.3s ease;
}
.smooth-render {
opacity: 0;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div class="min-h-screen">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8 flex justify-between items-center">
<h1 class="text-xl font-semibold text-gray-800">Analytics Dashboard</h1>
<div class="flex items-center space-x-4">
<div class="relative">
<button id="user-menu-button" class="flex items-center space-x-2 focus:outline-none">
<span class="text-gray-600">Admin</span>
<div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center">
<i class="fas fa-user text-indigo-600"></i>
</div>
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="bg-white p-6 rounded-xl shadow-sm card-hover transition-all smooth-render animate-fade-in delay-100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Total Users</p>
<p class="text-3xl font-semibold text-gray-800 mt-2">1,248</p>
<p class="text-sm text-green-500 mt-1 flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 12.5% from last month
</p>
</div>
<div class="w-12 h-12 rounded-full bg-blue-50 flex items-center justify-center">
<i class="fas fa-users text-blue-500 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm card-hover transition-all smooth-render animate-fade-in delay-200">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Active Sessions</p>
<p class="text-3xl font-semibold text-gray-800 mt-2">342</p>
<p class="text-sm text-green-500 mt-1 flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 8.2% from yesterday
</p>
</div>
<div class="w-12 h-12 rounded-full bg-green-50 flex items-center justify-center">
<i class="fas fa-signal text-green-500 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm card-hover transition-all smooth-render animate-fade-in delay-300">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Avg. Session</p>
<p class="text-3xl font-semibold text-gray-800 mt-2">4m 32s</p>
<p class="text-sm text-red-500 mt-1 flex items-center">
<i class="fas fa-arrow-down mr-1"></i> 1.3% from last week
</p>
</div>
<div class="w-12 h-12 rounded-full bg-purple-50 flex items-center justify-center">
<i class="fas fa-clock text-purple-500 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm card-hover transition-all smooth-render animate-fade-in delay-400">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500">Bounce Rate</p>
<p class="text-3xl font-semibold text-gray-800 mt-2">28.6%</p>
<p class="text-sm text-green-500 mt-1 flex items-center">
<i class="fas fa-arrow-down mr-1"></i> 2.4% improvement
</p>
</div>
<div class="w-12 h-12 rounded-full bg-yellow-50 flex items-center justify-center">
<i class="fas fa-chart-pie text-yellow-500 text-xl"></i>
</div>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<!-- Main Chart -->
<div class="bg-white p-6 rounded-xl shadow-sm lg:col-span-2 smooth-render animate-fade-in">
<div class="flex justify-between items-center mb-6">
<h2 class="text-lg font-semibold text-gray-800">User Activity</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 text-sm rounded-md bg-indigo-50 text-indigo-600">Week</button>
<button class="px-3 py-1 text-sm rounded-md text-gray-600 hover:bg-gray-100">Month</button>
<button class="px-3 py-1 text-sm rounded-md text-gray-600 hover:bg-gray-100">Year</button>
</div>
</div>
<div class="h-80">
<canvas id="mainChart"></canvas>
</div>
</div>
<!-- Pie Chart -->
<div class="bg-white p-6 rounded-xl shadow-sm smooth-render animate-fade-in">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Traffic Sources</h2>
<div class="h-64">
<canvas id="pieChart"></canvas>
</div>
<div class="mt-4 grid grid-cols-2 gap-2">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-indigo-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-green-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-yellow-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-purple-500 mr-2"></div>
<span class="text-sm text-gray-600">Social</span>
</div>
</div>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-white p-6 rounded-xl shadow-sm smooth-render animate-fade-in">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Recent Activity</h2>
<div class="space-y-4">
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-blue-50 flex items-center justify-center mr-4">
<i class="fas fa-user-plus text-blue-500"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">New user registered</p>
<p class="text-xs text-gray-500 mt-1">John Doe - 2 hours ago</p>
</div>
</div>
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-green-50 flex items-center justify-center mr-4">
<i class="fas fa-shopping-cart text-green-500"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">New purchase</p>
<p class="text-xs text-gray-500 mt-1">Order #1234 - 4 hours ago</p>
</div>
</div>
<div class="flex items-start pb-4 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-purple-50 flex items-center justify-center mr-4">
<i class="fas fa-comment text-purple-500"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">New feedback received</p>
<p class="text-xs text-gray-500 mt-1">"Great service!" - 6 hours ago</p>
</div>
</div>
<div class="flex items-start">
<div class="w-10 h-10 rounded-full bg-yellow-50 flex items-center justify-center mr-4">
<i class="fas fa-exclamation-triangle text-yellow-500"></i>
</div>
<div>
<p class="text-sm font-medium text-gray-800">Server warning</p>
<p class="text-xs text-gray-500 mt-1">High CPU usage detected - 8 hours ago</p>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Main Chart (Line Chart)
const mainCtx = document.getElementById('mainChart').getContext('2d');
const mainChart = new Chart(mainCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [
{
label: 'Active Users',
data: [450, 520, 480, 560, 610, 700, 750],
borderColor: '#6366F1',
backgroundColor: 'rgba(99, 102, 241, 0.05)',
borderWidth: 2,
tension: 0.3,
fill: true
},
{
label: 'New Users',
data: [200, 220, 250, 280, 300, 350, 400],
borderColor: '#10B981',
backgroundColor: 'rgba(16, 185, 129, 0.05)',
borderWidth: 2,
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
usePointStyle: true,
padding: 20
}
},
tooltip: {
mode: 'index',
intersect: false,
backgroundColor: '#1F2937',
titleFont: { size: 14 },
bodyFont: { size: 12 },
padding: 12,
cornerRadius: 8
}
},
scales: {
y: {
beginAtZero: true,
grid: {
drawBorder: false,
color: 'rgba(0, 0, 0, 0.05)'
},
ticks: {
stepSize: 100
}
},
x: {
grid: {
display: false,
drawBorder: false
}
}
}
}
});
// Pie Chart
const pieCtx = document.getElementById('pieChart').getContext('2d');
const pieChart = new Chart(pieCtx, {
type: 'doughnut',
data: {
labels: ['Direct', 'Organic', 'Referral', 'Social'],
datasets: [{
data: [35, 25, 20, 20],
backgroundColor: [
'#6366F1',
'#10B981',
'#F59E0B',
'#8B5CF6'
],
borderWidth: 0,
borderRadius: 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
cutout: '70%',
plugins: {
legend: {
display: false
},
tooltip: {
backgroundColor: '#1F2937',
bodyFont: { size: 12 },
padding: 12,
cornerRadius: 8
}
}
}
});
// Add hover effects to all cards
const cards = document.querySelectorAll('.card-hover');
cards.forEach(card => {
card.addEventListener('mouseenter', () => {
card.classList.add('shadow-lg');
});
card.addEventListener('mouseleave', () => {
card.classList.remove('shadow-lg');
});
});
// Make all smooth-render elements visible
setTimeout(() => {
document.querySelectorAll('.smooth-render').forEach(el => {
el.style.opacity = '1';
});
}, 50);
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=shivam9980/demo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |