Spaces:
Running
Running
File size: 17,753 Bytes
8352a1e | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mark Attendance | EduTrack Pro</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#4F46E5',
secondary: '#10B981',
}
}
}
}
</script>
<style>
.student-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
}
.attendance-toggle {
width: 3.5rem;
height: 2rem;
}
.attendance-toggle:checked {
background-color: #10B981;
}
.attendance-toggle:not(:checked) {
background-color: #EF4444;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<div class="flex-shrink-0 flex items-center">
<i data-feather="book-open" class="text-primary h-6 w-6"></i>
<span class="ml-2 text-xl font-bold text-gray-900">EduTrack Pro</span>
</div>
</div>
<div class="hidden sm:ml-6 sm:flex sm:items-center">
<div class="ml-3 relative">
<div>
<button type="button" class="bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/42" alt="User profile">
</button>
</div>
<div class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem">Professeur 1</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem">Professeur 2</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" role="menuitem">Professeur 3</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="py-8">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between mb-8">
<div>
<h1 class="text-2xl font-bold text-gray-900">Mark Attendance</h1>
<p class="mt-1 text-sm text-gray-500">Mathematics 101 - 08:00-09:30 - Room A12</p>
</div>
<div class="flex items-center space-x-4">
<span class="text-sm text-gray-500">24 students</span>
<button class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary hover:bg-primary-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Save Attendance
</button>
</div>
</div>
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
<!-- Date and Filters -->
<div class="px-4 py-5 sm:px-6 border-b border-gray-200 bg-gray-50 sm:flex sm:items-center sm:justify-between">
<h3 class="text-lg leading-6 font-medium text-gray-900">Attendance for Today, June 15</h3>
<div class="mt-3 sm:mt-0 sm:ml-4">
<label for="search" class="sr-only">Search</label>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i data-feather="search" class="h-4 w-4 text-gray-400"></i>
</div>
<input type="text" name="search" id="search" class="focus:ring-primary focus:border-primary block w-full pl-10 sm:text-sm border-gray-300 rounded-md" placeholder="Search students...">
</div>
</div>
</div>
<!-- Student List -->
<div class="bg-white">
<ul class="divide-y divide-gray-200">
<!-- Student 1 -->
<li class="px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/1" alt="Student avatar">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Alex Johnson</div>
<div class="text-sm text-gray-500">ID: ST20230001</div>
</div>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer attendance-toggle">
<div class="w-14 h-8 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-secondary"></div>
<span class="ml-3 text-sm font-medium text-gray-900 hidden sm:inline">Present</span>
</label>
</div>
</li>
<!-- Student 2 -->
<li class="px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/2" alt="Student avatar">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Maria Garcia</div>
<div class="text-sm text-gray-500">ID: ST20230002</div>
</div>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer attendance-toggle">
<div class="w-14 h-8 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-secondary"></div>
<span class="ml-3 text-sm font-medium text-gray-900 hidden sm:inline">Present</span>
</label>
</div>
</li>
<!-- Student 3 -->
<li class="px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/3" alt="Student avatar">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">James Smith</div>
<div class="text-sm text-gray-500">ID: ST20230003</div>
</div>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer attendance-toggle">
<div class="w-14 h-8 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-secondary"></div>
<span class="ml-3 text-sm font-medium text-gray-900 hidden sm:inline">Absent</span>
</label>
</div>
</li>
<!-- Student 4 -->
<li class="px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/4" alt="Student avatar">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Sarah Williams</div>
<div class="text-sm text-gray-500">ID: ST20230004</div>
</div>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer attendance-toggle">
<div class="w-14 h-8 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-secondary"></div>
<span class="ml-3 text-sm font-medium text-gray-900 hidden sm:inline">Present</span>
</label>
</div>
</li>
<!-- Student 5 -->
<li class="px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/5" alt="Student avatar">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">David Kim</div>
<div class="text-sm text-gray-500">ID: ST20230005</div>
</div>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer attendance-toggle">
<div class="w-14 h-8 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-secondary"></div>
<span class="ml-3 text-sm font-medium text-gray-900 hidden sm:inline">Absent</span>
</label>
</div>
</li>
</ul>
</div>
<!-- Pagination -->
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Previous</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Next</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing <span class="font-medium">1</span> to <span class="font-medium">5</span> of <span class="font-medium">24</span> students
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<i data-feather="chevron-left" class="h-5 w-5"></i>
</a>
<a href="#" aria-current="page" class="z-10 bg-primary border-primary text-white relative inline-flex items-center px-4 py-2 border text-sm font-medium">1</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">2</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">3</a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<i data-feather="chevron-right" class="h-5 w-5"></i>
</a>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Show/hide teacher dropdown
document.getElementById('user-menu-button').addEventListener('click', function() {
const menu = document.querySelector('[role="menu"]');
menu.classList.toggle('hidden');
});
// Close dropdown when clicking outside
document.addEventListener('click', function(event) {
if (!event.target.closest('#user-menu-button') && !event.target.closest('[role="menu"]')) {
const menu = document.querySelector('[role="menu"]');
menu.classList.add('hidden');
}
});
feather.replace();
// Toggle attendance functionality
document.querySelectorAll('.attendance-toggle').forEach(toggle => {
toggle.addEventListener('change', function() {
const statusText = this.nextElementSibling.nextElementSibling;
if (this.checked) {
statusText.textContent = 'Present';
this.nextElementSibling.classList.remove('bg-gray-200');
this.nextElementSibling.classList.add('bg-secondary');
} else {
statusText.textContent = 'Absent';
this.nextElementSibling.classList.remove('bg-secondary');
this.nextElementSibling.classList.add('bg-gray-200');
}
});
});
</script>
</body>
</html>
|