edupulse-pro / tracking.html
froublot's picture
la page de tracking
de744cc verified
Raw
History Blame Contribute Delete
14.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tracking | EduPulse</title>
<link rel="stylesheet" href="style.css">
<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">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-surface-1">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar Component -->
<script src="components/sidebar.js"></script>
<custom-sidebar></custom-sidebar>
<!-- Main Content Area -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Header Component -->
<script src="components/header.js"></script>
<custom-header></custom-header>
<!-- Main Workspace -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-100">
<div class="max-w-7xl mx-auto">
<div class="flex justify-between items-center mb-6">
<h1 class="text-2xl font-bold text-gray-900">Participant Tracking</h1>
<div class="flex space-x-4">
<select class="px-4 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500">
<option>Last 7 days</option>
<option>Last 30 days</option>
<option>Last 90 days</option>
<option>Custom range</option>
</select>
<button class="btn-primary">
<i class="fas fa-download mr-2"></i> Export
</button>
</div>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="card p-6">
<p class="text-sm text-gray-500 mb-1">Total Participants</p>
<p class="text-2xl font-bold">142</p>
<p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 12% from last month</p>
</div>
<div class="card p-6">
<p class="text-sm text-gray-500 mb-1">Active Now</p>
<p class="text-2xl font-bold">24</p>
<p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 3% from yesterday</p>
</div>
<div class="card p-6">
<p class="text-sm text-gray-500 mb-1">Avg. Completion</p>
<p class="text-2xl font-bold">78%</p>
<div class="w-full bg-gray-200 rounded-full h-2 mt-2">
<div class="bg-blue-600 h-2 rounded-full" style="width: 78%"></div>
</div>
</div>
<div class="card p-6">
<p class="text-sm text-gray-500 mb-1">Avg. Time Spent</p>
<p class="text-2xl font-bold">42 min</p>
<p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 8% from last week</p>
</div>
</div>
<!-- Engagement Chart -->
<div class="card p-6 mb-8">
<h2 class="text-lg font-medium text-gray-900 mb-4">Engagement Over Time</h2>
<canvas id="engagementChart" height="300"></canvas>
</div>
<!-- Course Completion -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="card p-6">
<h2 class="text-lg font-medium text-gray-900 mb-4">Course Completion</h2>
<canvas id="completionChart" height="250"></canvas>
</div>
<div class="card p-6">
<h2 class="text-lg font-medium text-gray-900 mb-4">Activity by Time of Day</h2>
<canvas id="timeChart" height="250"></canvas>
</div>
</div>
<!-- Top Participants -->
<div class="card p-6">
<h2 class="text-lg font-medium text-gray-900 mb-4">Top Participants</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Participant</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Course</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Completion</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Time Spent</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Active</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 rounded-full overflow-hidden">
<img src="http://static.photos/people/200x200/20" class="h-full w-full object-cover">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Alex Johnson</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Calculus Fundamentals</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 95%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12.5 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2 hours ago</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 rounded-full overflow-hidden">
<img src="http://static.photos/people/200x200/21" class="h-full w-full object-cover">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Sarah Williams</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Biology Experiments</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 87%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10.2 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5 hours ago</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 rounded-full overflow-hidden">
<img src="http://static.photos/people/200x200/22" class="h-full w-full object-cover">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Michael Brown</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ancient Civilizations</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 82%"></div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.7 hours</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1 day ago</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="components/sidebar.js"></script>
<script src="components/header.js"></script>
<script src="script.js"></script>
<script>
// Engagement Chart
const engagementCtx = document.getElementById('engagementChart').getContext('2d');
const engagementChart = new Chart(engagementCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
label: 'Active Participants',
data: [65, 59, 80, 81, 56, 55, 90],
backgroundColor: 'rgba(79, 70, 229, 0.1)',
borderColor: 'rgba(79, 70, 229, 1)',
borderWidth: 2,
tension: 0.3,
fill: true
}, {
label: 'Content Views',
data: [28, 48, 40, 19, 86, 27, 40],
backgroundColor: 'rgba(16, 185, 129, 0.1)',
borderColor: 'rgba(16, 185, 129, 1)',
borderWidth: 2,
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Completion Chart
const completionCtx = document.getElementById('completionChart').getContext('2d');
const completionChart = new Chart(completionCtx, {
type: 'doughnut',
data: {
labels: ['Completed', 'In Progress', 'Not Started'],
datasets: [{
data: [45, 30, 25],
backgroundColor: [
'rgba(16, 185, 129, 0.8)',
'rgba(245, 158, 11, 0.8)',
'rgba(239, 68, 68, 0.8)'
],
borderWidth: 0
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
}
}
}
});
// Time of Day Chart
const timeCtx = document.getElementById('timeChart').getContext('2d');
const timeChart = new Chart(timeCtx, {
type: 'bar',
data: {
labels: ['6-9 AM', '9-12 PM', '12-3 PM', '3-6 PM', '6-9 PM', '9-12 AM'],
datasets: [{
label: 'Activity',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: 'rgba(79, 70, 229, 0.8)',
borderWidth: 0
}]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</body>
</html>