Spaces:
Running
Running
File size: 14,338 Bytes
de744cc | 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 | <!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> |