froublot commited on
Commit
de744cc
·
verified ·
1 Parent(s): d0ee49e

la page de tracking

Browse files
Files changed (2) hide show
  1. components/sidebar.js +2 -2
  2. tracking.html +263 -0
components/sidebar.js CHANGED
@@ -229,9 +229,9 @@ class CustomSidebar extends HTMLElement {
229
  <div class="menu-icon">
230
  <i class="fas fa-chart-bar"></i>
231
  </div>
232
- <div class="menu-text">Tracking</div>
233
  </div>
234
- </div>
235
 
236
  <div class="menu-section">
237
  <div class="section-title">Tools</div>
 
229
  <div class="menu-icon">
230
  <i class="fas fa-chart-bar"></i>
231
  </div>
232
+ <a href="tracking.html" class="menu-text">Tracking</a>
233
  </div>
234
+ </div>
235
 
236
  <div class="menu-section">
237
  <div class="section-title">Tools</div>
tracking.html ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Tracking | EduPulse</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
11
+ </head>
12
+ <body class="bg-surface-1">
13
+ <div class="flex h-screen overflow-hidden">
14
+ <!-- Sidebar Component -->
15
+ <script src="components/sidebar.js"></script>
16
+ <custom-sidebar></custom-sidebar>
17
+
18
+ <!-- Main Content Area -->
19
+ <div class="flex-1 flex flex-col overflow-hidden">
20
+ <!-- Header Component -->
21
+ <script src="components/header.js"></script>
22
+ <custom-header></custom-header>
23
+
24
+ <!-- Main Workspace -->
25
+ <main class="flex-1 overflow-y-auto p-6 bg-gray-100">
26
+ <div class="max-w-7xl mx-auto">
27
+ <div class="flex justify-between items-center mb-6">
28
+ <h1 class="text-2xl font-bold text-gray-900">Participant Tracking</h1>
29
+ <div class="flex space-x-4">
30
+ <select class="px-4 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500">
31
+ <option>Last 7 days</option>
32
+ <option>Last 30 days</option>
33
+ <option>Last 90 days</option>
34
+ <option>Custom range</option>
35
+ </select>
36
+ <button class="btn-primary">
37
+ <i class="fas fa-download mr-2"></i> Export
38
+ </button>
39
+ </div>
40
+ </div>
41
+
42
+ <!-- Stats Cards -->
43
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
44
+ <div class="card p-6">
45
+ <p class="text-sm text-gray-500 mb-1">Total Participants</p>
46
+ <p class="text-2xl font-bold">142</p>
47
+ <p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 12% from last month</p>
48
+ </div>
49
+ <div class="card p-6">
50
+ <p class="text-sm text-gray-500 mb-1">Active Now</p>
51
+ <p class="text-2xl font-bold">24</p>
52
+ <p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 3% from yesterday</p>
53
+ </div>
54
+ <div class="card p-6">
55
+ <p class="text-sm text-gray-500 mb-1">Avg. Completion</p>
56
+ <p class="text-2xl font-bold">78%</p>
57
+ <div class="w-full bg-gray-200 rounded-full h-2 mt-2">
58
+ <div class="bg-blue-600 h-2 rounded-full" style="width: 78%"></div>
59
+ </div>
60
+ </div>
61
+ <div class="card p-6">
62
+ <p class="text-sm text-gray-500 mb-1">Avg. Time Spent</p>
63
+ <p class="text-2xl font-bold">42 min</p>
64
+ <p class="text-sm text-green-600 mt-1"><i class="fas fa-arrow-up mr-1"></i> 8% from last week</p>
65
+ </div>
66
+ </div>
67
+
68
+ <!-- Engagement Chart -->
69
+ <div class="card p-6 mb-8">
70
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Engagement Over Time</h2>
71
+ <canvas id="engagementChart" height="300"></canvas>
72
+ </div>
73
+
74
+ <!-- Course Completion -->
75
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
76
+ <div class="card p-6">
77
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Course Completion</h2>
78
+ <canvas id="completionChart" height="250"></canvas>
79
+ </div>
80
+ <div class="card p-6">
81
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Activity by Time of Day</h2>
82
+ <canvas id="timeChart" height="250"></canvas>
83
+ </div>
84
+ </div>
85
+
86
+ <!-- Top Participants -->
87
+ <div class="card p-6">
88
+ <h2 class="text-lg font-medium text-gray-900 mb-4">Top Participants</h2>
89
+ <div class="overflow-x-auto">
90
+ <table class="min-w-full divide-y divide-gray-200">
91
+ <thead class="bg-gray-50">
92
+ <tr>
93
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Participant</th>
94
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Course</th>
95
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Completion</th>
96
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Time Spent</th>
97
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Active</th>
98
+ </tr>
99
+ </thead>
100
+ <tbody class="bg-white divide-y divide-gray-200">
101
+ <tr class="hover:bg-gray-50">
102
+ <td class="px-6 py-4 whitespace-nowrap">
103
+ <div class="flex items-center">
104
+ <div class="flex-shrink-0 h-10 w-10 rounded-full overflow-hidden">
105
+ <img src="http://static.photos/people/200x200/20" class="h-full w-full object-cover">
106
+ </div>
107
+ <div class="ml-4">
108
+ <div class="text-sm font-medium text-gray-900">Alex Johnson</div>
109
+ </div>
110
+ </div>
111
+ </td>
112
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Calculus Fundamentals</td>
113
+ <td class="px-6 py-4 whitespace-nowrap">
114
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
115
+ <div class="bg-green-600 h-2.5 rounded-full" style="width: 95%"></div>
116
+ </div>
117
+ </td>
118
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12.5 hours</td>
119
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2 hours ago</td>
120
+ </tr>
121
+ <tr class="hover:bg-gray-50">
122
+ <td class="px-6 py-4 whitespace-nowrap">
123
+ <div class="flex items-center">
124
+ <div class="flex-shrink-0 h-10 w-10 rounded-full overflow-hidden">
125
+ <img src="http://static.photos/people/200x200/21" class="h-full w-full object-cover">
126
+ </div>
127
+ <div class="ml-4">
128
+ <div class="text-sm font-medium text-gray-900">Sarah Williams</div>
129
+ </div>
130
+ </div>
131
+ </td>
132
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Biology Experiments</td>
133
+ <td class="px-6 py-4 whitespace-nowrap">
134
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
135
+ <div class="bg-green-600 h-2.5 rounded-full" style="width: 87%"></div>
136
+ </div>
137
+ </td>
138
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10.2 hours</td>
139
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5 hours ago</td>
140
+ </tr>
141
+ <tr class="hover:bg-gray-50">
142
+ <td class="px-6 py-4 whitespace-nowrap">
143
+ <div class="flex items-center">
144
+ <div class="flex-shrink-0 h-10 w-10 rounded-full overflow-hidden">
145
+ <img src="http://static.photos/people/200x200/22" class="h-full w-full object-cover">
146
+ </div>
147
+ <div class="ml-4">
148
+ <div class="text-sm font-medium text-gray-900">Michael Brown</div>
149
+ </div>
150
+ </div>
151
+ </td>
152
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ancient Civilizations</td>
153
+ <td class="px-6 py-4 whitespace-nowrap">
154
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
155
+ <div class="bg-green-600 h-2.5 rounded-full" style="width: 82%"></div>
156
+ </div>
157
+ </td>
158
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8.7 hours</td>
159
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1 day ago</td>
160
+ </tr>
161
+ </tbody>
162
+ </table>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </main>
167
+ </div>
168
+ </div>
169
+
170
+ <script src="components/sidebar.js"></script>
171
+ <script src="components/header.js"></script>
172
+ <script src="script.js"></script>
173
+ <script>
174
+ // Engagement Chart
175
+ const engagementCtx = document.getElementById('engagementChart').getContext('2d');
176
+ const engagementChart = new Chart(engagementCtx, {
177
+ type: 'line',
178
+ data: {
179
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
180
+ datasets: [{
181
+ label: 'Active Participants',
182
+ data: [65, 59, 80, 81, 56, 55, 90],
183
+ backgroundColor: 'rgba(79, 70, 229, 0.1)',
184
+ borderColor: 'rgba(79, 70, 229, 1)',
185
+ borderWidth: 2,
186
+ tension: 0.3,
187
+ fill: true
188
+ }, {
189
+ label: 'Content Views',
190
+ data: [28, 48, 40, 19, 86, 27, 40],
191
+ backgroundColor: 'rgba(16, 185, 129, 0.1)',
192
+ borderColor: 'rgba(16, 185, 129, 1)',
193
+ borderWidth: 2,
194
+ tension: 0.3,
195
+ fill: true
196
+ }]
197
+ },
198
+ options: {
199
+ responsive: true,
200
+ plugins: {
201
+ legend: {
202
+ position: 'top',
203
+ },
204
+ },
205
+ scales: {
206
+ y: {
207
+ beginAtZero: true
208
+ }
209
+ }
210
+ }
211
+ });
212
+
213
+ // Completion Chart
214
+ const completionCtx = document.getElementById('completionChart').getContext('2d');
215
+ const completionChart = new Chart(completionCtx, {
216
+ type: 'doughnut',
217
+ data: {
218
+ labels: ['Completed', 'In Progress', 'Not Started'],
219
+ datasets: [{
220
+ data: [45, 30, 25],
221
+ backgroundColor: [
222
+ 'rgba(16, 185, 129, 0.8)',
223
+ 'rgba(245, 158, 11, 0.8)',
224
+ 'rgba(239, 68, 68, 0.8)'
225
+ ],
226
+ borderWidth: 0
227
+ }]
228
+ },
229
+ options: {
230
+ responsive: true,
231
+ plugins: {
232
+ legend: {
233
+ position: 'right',
234
+ }
235
+ }
236
+ }
237
+ });
238
+
239
+ // Time of Day Chart
240
+ const timeCtx = document.getElementById('timeChart').getContext('2d');
241
+ const timeChart = new Chart(timeCtx, {
242
+ type: 'bar',
243
+ data: {
244
+ labels: ['6-9 AM', '9-12 PM', '12-3 PM', '3-6 PM', '6-9 PM', '9-12 AM'],
245
+ datasets: [{
246
+ label: 'Activity',
247
+ data: [12, 19, 3, 5, 2, 3],
248
+ backgroundColor: 'rgba(79, 70, 229, 0.8)',
249
+ borderWidth: 0
250
+ }]
251
+ },
252
+ options: {
253
+ responsive: true,
254
+ scales: {
255
+ y: {
256
+ beginAtZero: true
257
+ }
258
+ }
259
+ }
260
+ });
261
+ </script>
262
+ </body>
263
+ </html>