Spaces:
Running
Running
Download attendance.html from masterseb/classtrack-pro: direct link, hf CLI and curl.
- Browser
- Download file 17.8 kB
-
https://huggingface.co/spaces/masterseb/classtrack-pro/resolve/main/attendance.html
- Command line
-
hf download hf://spaces/masterseb/classtrack-pro/attendance.html
-
curl -L -o attendance.html https://huggingface.co/spaces/masterseb/classtrack-pro/resolve/main/attendance.html
17.8 kB
| <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> | |