a-simple-dashboard / index.html
Steelfreak's picture
Add 2 files
368287a verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern 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>
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.floating {
animation: float 3s ease-in-out infinite;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.progress-bar {
transition: width 1.5s ease-in-out;
}
.chart-container {
height: 250px;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<div class="min-h-screen flex flex-col">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-rocket text-2xl"></i>
<h1 class="text-2xl font-bold">NexusDash</h1>
</div>
<div class="flex items-center space-x-6">
<div class="relative">
<i class="fas fa-bell text-xl cursor-pointer"></i>
<span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
</div>
<div class="flex items-center space-x-2 cursor-pointer">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="w-8 h-8 rounded-full border-2 border-white">
<span class="font-medium">Sarah K.</span>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-8">
<!-- Welcome Card -->
<div class="lg:col-span-2 bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6 flex flex-col md:flex-row items-center">
<div class="flex-shrink-0 mb-4 md:mb-0 md:mr-6">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Welcome" class="w-20 h-20 rounded-full border-4 border-purple-200 floating">
</div>
<div>
<h2 class="text-2xl font-bold text-gray-800">Welcome back, Sarah!</h2>
<p class="text-gray-600 mt-2">Here's what's happening with your projects today.</p>
<button class="mt-4 bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded-lg transition-colors duration-300">
View Dashboard
</button>
</div>
</div>
</div>
<!-- Stats Cards -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Total Revenue</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">$24,780</h3>
</div>
<div class="bg-green-100 text-green-800 p-2 rounded-lg">
<i class="fas fa-arrow-up"></i>
<span>12.5%</span>
</div>
</div>
<div class="mt-4">
<div class="h-2 bg-gray-200 rounded-full overflow-hidden">
<div class="h-full bg-green-500 progress-bar" style="width: 75%"></div>
</div>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">New Users</p>
<h3 class="text-2xl font-bold text-gray-800 mt-1">1,254</h3>
</div>
<div class="bg-blue-100 text-blue-800 p-2 rounded-lg">
<i class="fas fa-users"></i>
<span>24.3%</span>
</div>
</div>
<div class="mt-4">
<div class="h-2 bg-gray-200 rounded-full overflow-hidden">
<div class="h-full bg-blue-500 progress-bar" style="width: 60%"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<!-- Main Chart -->
<div class="lg:col-span-2 bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold text-gray-800">Performance Overview</h2>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-lg text-sm">Week</button>
<button class="px-3 py-1 bg-purple-600 text-white rounded-lg text-sm">Month</button>
<button class="px-3 py-1 bg-gray-100 text-gray-700 rounded-lg text-sm">Year</button>
</div>
</div>
<div class="chart-container">
<canvas id="mainChart"></canvas>
</div>
</div>
</div>
<!-- Pie Chart -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-6">Traffic Sources</h2>
<div class="chart-container">
<canvas id="pieChart"></canvas>
</div>
<div class="mt-4 grid grid-cols-2 gap-4">
<div class="flex items-center">
<div class="w-3 h-3 bg-blue-500 rounded-full mr-2"></div>
<span class="text-sm text-gray-600">Direct</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-green-500 rounded-full mr-2"></div>
<span class="text-sm text-gray-600">Organic</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-purple-500 rounded-full mr-2"></div>
<span class="text-sm text-gray-600">Referral</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-yellow-500 rounded-full mr-2"></div>
<span class="text-sm text-gray-600">Social</span>
</div>
</div>
</div>
</div>
</div>
<!-- Projects Table -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover transition-all duration-300">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold text-gray-800">Recent Projects</h2>
<button class="text-purple-600 hover:text-purple-800 font-medium">
View All <i class="fas fa-arrow-right ml-1"></i>
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Team</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Progress</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Due Date</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-purple-100 rounded-lg flex items-center justify-center">
<i class="fas fa-mobile-alt text-purple-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Mobile App Redesign</div>
<div class="text-sm text-gray-500">UI/UX Design</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/women/12.jpg" alt="">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/men/32.jpg" alt="">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/women/44.jpg" alt="">
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Active</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 65%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-blue-100 rounded-lg flex items-center justify-center">
<i class="fas fa-globe text-blue-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Website Launch</div>
<div class="text-sm text-gray-500">Development</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/men/75.jpg" alt="">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/women/44.jpg" alt="">
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Pending</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 30%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 20, 2023</td>
</tr>
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-green-100 rounded-lg flex items-center justify-center">
<i class="fas fa-chart-line text-green-600"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Marketing Campaign</div>
<div class="text-sm text-gray-500">Marketing</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex -space-x-2">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/women/68.jpg" alt="">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/men/32.jpg" alt="">
<img class="w-8 h-8 rounded-full border-2 border-white" src="https://randomuser.me/api/portraits/men/22.jpg" alt="">
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">In Review</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 85%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Apr 28, 2023</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-white border-t border-gray-200 py-6">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="text-gray-600 mb-4 md:mb-0">
© 2023 NexusDash. All rights reserved.
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-500 hover:text-purple-600 transition-colors duration-300">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="text-gray-500 hover:text-purple-600 transition-colors duration-300">
<i class="fab fa-facebook"></i>
</a>
<a href="#" class="text-gray-500 hover:text-purple-600 transition-colors duration-300">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="text-gray-500 hover:text-purple-600 transition-colors duration-300">
<i class="fab fa-linkedin"></i>
</a>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Animate progress bars on page load
document.addEventListener('DOMContentLoaded', function() {
// Main Chart
const mainCtx = document.getElementById('mainChart').getContext('2d');
const mainChart = new Chart(mainCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [
{
label: 'Revenue',
data: [12000, 19000, 15000, 20000, 22000, 24780],
borderColor: '#667eea',
backgroundColor: 'rgba(102, 126, 234, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
},
{
label: 'Users',
data: [800, 950, 1100, 1050, 1200, 1254],
borderColor: '#4fd1c5',
backgroundColor: 'rgba(79, 209, 197, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// 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, 30, 20, 15],
backgroundColor: [
'#4299e1',
'#48bb78',
'#9f7aea',
'#ecc94b'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
cutout: '70%',
plugins: {
legend: {
display: false
}
}
}
});
// Animate progress bars
setTimeout(() => {
document.querySelectorAll('.progress-bar').forEach(bar => {
bar.style.width = bar.style.width;
});
}, 500);
});
// Add hover effect to table rows
document.querySelectorAll('tr').forEach(row => {
row.addEventListener('mouseenter', function() {
this.style.backgroundColor = '#f9fafb';
});
row.addEventListener('mouseleave', function() {
this.style.backgroundColor = '';
});
});
</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=Steelfreak/a-simple-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
</html>