Download students.html from crisxiee/undefined: direct link, hf CLI and curl.
- Browser
- Download file 10 kB
-
https://huggingface.co/spaces/crisxiee/undefined/resolve/main/students.html
- Command line
-
hf download hf://spaces/crisxiee/undefined/students.html
-
curl -L -o students.html https://huggingface.co/spaces/crisxiee/undefined/resolve/main/students.html
10 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>BrainyBots | Student Management</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> | |
| <style> | |
| .neon-card { | |
| background: rgba(15, 23, 42, 0.7); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(94, 234, 212, 0.2); | |
| transition: all 0.3s ease; | |
| } | |
| .neon-card:hover { | |
| border-color: rgba(94, 234, 212, 0.5); | |
| box-shadow: 0 0 15px rgba(94, 234, 212, 0.3); | |
| } | |
| .glow-text { | |
| text-shadow: 0 0 8px rgba(94, 234, 212, 0.6); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-slate-900 text-gray-100 min-h-screen"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <div class="flex justify-between items-center mb-8"> | |
| <h1 class="text-3xl font-bold text-teal-400 glow-text">BrainyBots Student Database</h1> | |
| <button id="addStudentBtn" class="bg-teal-600 hover:bg-teal-500 text-white px-4 py-2 rounded-lg flex items-center"> | |
| <i data-feather="user-plus" class="mr-2"></i> Add Student | |
| </button> | |
| </div> | |
| <!-- Search and Filters --> | |
| <div class="neon-card rounded-xl p-6 mb-8"> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Search</label> | |
| <input type="text" placeholder="Student ID or Name" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Program</label> | |
| <select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| <option>All Programs</option> | |
| <option>Quantum Computing</option> | |
| <option>Neural Networks</option> | |
| <option>Robotics</option> | |
| <option>Biotech</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Status</label> | |
| <select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| <option>All Students</option> | |
| <option>Active</option> | |
| <option>Graduated</option> | |
| <option>On Leave</option> | |
| </select> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Student Table --> | |
| <div class="neon-card rounded-xl p-6 overflow-x-auto"> | |
| <table class="w-full"> | |
| <thead> | |
| <tr class="border-b border-slate-700"> | |
| <th class="text-left py-3 px-4 text-teal-400">Student ID</th> | |
| <th class="text-left py-3 px-4 text-teal-400">Full Name</th> | |
| <th class="text-left py-3 px-4 text-teal-400">Program</th> | |
| <th class="text-left py-3 px-4 text-teal-400">Enrollment Date</th> | |
| <th class="text-left py-3 px-4 text-teal-400">Status</th> | |
| <th class="text-right py-3 px-4 text-teal-400">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody id="studentTableBody"> | |
| <!-- Student data will be loaded here --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Add Student Modal --> | |
| <div id="studentModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden"> | |
| <div class="bg-slate-800 rounded-xl p-6 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-bold text-teal-400">Add New Student</h3> | |
| <button id="closeModalBtn" class="text-gray-400 hover:text-white"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="studentForm" class="space-y-4"> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Full Name</label> | |
| <input type="text" required class="w-full bg-slate-700 border border-slate-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Student ID</label> | |
| <input type="text" required class="w-full bg-slate-700 border border-slate-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Program</label> | |
| <select required class="w-full bg-slate-700 border border-slate-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| <option value="">Select Program</option> | |
| <option>Quantum Computing</option> | |
| <option>Neural Networks</option> | |
| <option>Robotics</option> | |
| <option>Biotech</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-1 text-teal-300">Enrollment Date</label> | |
| <input type="date" required class="w-full bg-slate-700 border border-slate-600 rounded-lg px-4 py-2 focus:ring-2 focus:ring-teal-500 focus:border-teal-500"> | |
| </div> | |
| <div class="pt-4"> | |
| <button type="submit" class="w-full bg-teal-600 hover:bg-teal-500 text-white py-2 rounded-lg flex items-center justify-center"> | |
| <i data-feather="save" class="mr-2"></i> Save Student | |
| </button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| // Modal functionality | |
| const modal = document.getElementById('studentModal'); | |
| const addBtn = document.getElementById('addStudentBtn'); | |
| const closeBtn = document.getElementById('closeModalBtn'); | |
| addBtn.addEventListener('click', () => modal.classList.remove('hidden')); | |
| closeBtn.addEventListener('click', () => modal.classList.add('hidden')); | |
| // Sample data - in a real app this would come from an API | |
| const sampleStudents = [ | |
| { id: 'QC-2023-001', name: 'Alex Turing', program: 'Quantum Computing', date: '2023-09-15', status: 'Active' }, | |
| { id: 'NN-2023-042', name: 'Jamie Lovelace', program: 'Neural Networks', date: '2023-08-22', status: 'Active' }, | |
| { id: 'RB-2023-017', name: 'Taylor Hopper', program: 'Robotics', date: '2023-07-30', status: 'On Leave' }, | |
| { id: 'BT-2023-089', name: 'Riley Curie', program: 'Biotech', date: '2023-09-05', status: 'Active' } | |
| ]; | |
| // Render student table | |
| function renderStudents() { | |
| const tableBody = document.getElementById('studentTableBody'); | |
| tableBody.innerHTML = ''; | |
| sampleStudents.forEach(student => { | |
| const row = document.createElement('tr'); | |
| row.className = 'border-b border-slate-700 hover:bg-slate-800'; | |
| row.innerHTML = ` | |
| <td class="py-3 px-4">${student.id}</td> | |
| <td class="py-3 px-4">${student.name}</td> | |
| <td class="py-3 px-4">${student.program}</td> | |
| <td class="py-3 px-4">${student.date}</td> | |
| <td class="py-3 px-4"><span class="px-2 py-1 rounded-full text-xs ${getStatusClass(student.status)}">${student.status}</span></td> | |
| <td class="py-3 px-4 text-right"> | |
| <button class="text-teal-400 hover:text-teal-300 mr-3" onclick="viewStudent('${student.id}')"> | |
| <i data-feather="eye"></i> | |
| </button> | |
| <button class="text-blue-400 hover:text-blue-300 mr-3"> | |
| <i data-feather="edit"></i> | |
| </button> | |
| <button class="text-red-400 hover:text-red-300" onclick="deleteStudent('${student.id}')"> | |
| <i data-feather="trash-2"></i> | |
| </button> | |
| </td> | |
| `; | |
| tableBody.appendChild(row); | |
| }); | |
| feather.replace(); | |
| } | |
| function getStatusClass(status) { | |
| switch(status) { | |
| case 'Active': return 'bg-green-900 text-green-300'; | |
| case 'Graduated': return 'bg-purple-900 text-purple-300'; | |
| case 'On Leave': return 'bg-amber-900 text-amber-300'; | |
| default: return 'bg-gray-900 text-gray-300'; | |
| } | |
| } | |
| function viewStudent(id) { | |
| alert(`Viewing student with ID: ${id}`); | |
| } | |
| function deleteStudent(id) { | |
| if(confirm(`Are you sure you want to delete student ${id}?`)) { | |
| alert(`Student ${id} deleted successfully!`); | |
| // In a real app, you would call an API here | |
| renderStudents(); | |
| } | |
| } | |
| // Initialize the page | |
| document.addEventListener('DOMContentLoaded', renderStudents); | |
| </script> | |
| </body> | |
| </html> |