creat a data base sis student information system with a sci and technology theme and that i can add student remove and access information
Browse files- README.md +8 -4
- index.html +156 -19
- students.html +200 -0
README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji: 📚
|
| 4 |
colorFrom: purple
|
| 5 |
-
colorTo:
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: undefined
|
|
|
|
| 3 |
colorFrom: purple
|
| 4 |
+
colorTo: yellow
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
| 14 |
+
|
index.html
CHANGED
|
@@ -1,19 +1,156 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>QuantumGrade ScholarNet</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
|
| 12 |
+
<style>
|
| 13 |
+
.vanta-bg {
|
| 14 |
+
position: absolute;
|
| 15 |
+
top: 0;
|
| 16 |
+
left: 0;
|
| 17 |
+
width: 100%;
|
| 18 |
+
height: 100%;
|
| 19 |
+
z-index: -1;
|
| 20 |
+
opacity: 0.15;
|
| 21 |
+
}
|
| 22 |
+
.glass-card {
|
| 23 |
+
background: rgba(255, 255, 255, 0.85);
|
| 24 |
+
backdrop-filter: blur(10px);
|
| 25 |
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
| 26 |
+
}
|
| 27 |
+
</style>
|
| 28 |
+
</head>
|
| 29 |
+
<body class="bg-gray-50 min-h-screen">
|
| 30 |
+
<div id="vanta-bg" class="vanta-bg"></div>
|
| 31 |
+
|
| 32 |
+
<header class="bg-indigo-900 text-white shadow-lg">
|
| 33 |
+
<div class="container mx-auto px-4 py-6">
|
| 34 |
+
<div class="flex justify-between items-center">
|
| 35 |
+
<div class="flex items-center space-x-2">
|
| 36 |
+
<i data-feather="atom" class="w-8 h-8 text-emerald-400"></i>
|
| 37 |
+
<h1 class="text-2xl font-bold">QuantumGrade<span class="text-emerald-400">ScholarNet</span></h1>
|
| 38 |
+
</div>
|
| 39 |
+
<nav class="hidden md:flex space-x-8">
|
| 40 |
+
<a href="index.html" class="hover:text-emerald-400 font-medium">Dashboard</a>
|
| 41 |
+
<a href="students.html" class="hover:text-emerald-400 font-medium">Students</a>
|
| 42 |
+
<a href="#" class="hover:text-emerald-400 font-medium">Courses</a>
|
| 43 |
+
<a href="#" class="hover:text-emerald-400 font-medium">Reports</a>
|
| 44 |
+
</nav>
|
| 45 |
+
<button class="md:hidden">
|
| 46 |
+
<i data-feather="menu" class="w-6 h-6"></i>
|
| 47 |
+
</button>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
</header>
|
| 51 |
+
|
| 52 |
+
<main class="container mx-auto px-4 py-8">
|
| 53 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 54 |
+
<!-- Quick Stats -->
|
| 55 |
+
<div class="glass-card rounded-xl shadow-lg p-6 lg:col-span-3">
|
| 56 |
+
<h2 class="text-xl font-bold mb-6 text-indigo-900">System Overview</h2>
|
| 57 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 58 |
+
<div class="bg-gradient-to-r from-indigo-500 to-purple-600 rounded-lg p-6 text-white">
|
| 59 |
+
<div class="flex justify-between items-center">
|
| 60 |
+
<div>
|
| 61 |
+
<p class="text-sm opacity-80">Total Students</p>
|
| 62 |
+
<h3 class="text-3xl font-bold">2,450</h3>
|
| 63 |
+
</div>
|
| 64 |
+
<i data-feather="users" class="w-10 h-10"></i>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="bg-gradient-to-r from-emerald-500 to-teal-600 rounded-lg p-6 text-white">
|
| 68 |
+
<div class="flex justify-between items-center">
|
| 69 |
+
<div>
|
| 70 |
+
<p class="text-sm opacity-80">Active Courses</p>
|
| 71 |
+
<h3 class="text-3xl font-bold">48</h3>
|
| 72 |
+
</div>
|
| 73 |
+
<i data-feather="book" class="w-10 h-10"></i>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="bg-gradient-to-r from-amber-500 to-orange-600 rounded-lg p-6 text-white">
|
| 77 |
+
<div class="flex justify-between items-center">
|
| 78 |
+
<div>
|
| 79 |
+
<p class="text-sm opacity-80">Faculty Staff</p>
|
| 80 |
+
<h3 class="text-3xl font-bold">156</h3>
|
| 81 |
+
</div>
|
| 82 |
+
<i data-feather="award" class="w-10 h-10"></i>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
|
| 88 |
+
<!-- Recent Activity -->
|
| 89 |
+
<div class="glass-card rounded-xl shadow-lg p-6 lg:col-span-2">
|
| 90 |
+
<div class="flex justify-between items-center mb-6">
|
| 91 |
+
<h2 class="text-xl font-bold text-indigo-900">Recent Activity</h2>
|
| 92 |
+
<button class="text-indigo-600 hover:text-indigo-800 text-sm font-medium">View All</button>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="space-y-4">
|
| 95 |
+
<div class="flex items-start p-4 hover:bg-gray-50 rounded-lg transition">
|
| 96 |
+
<div class="bg-emerald-100 p-3 rounded-full mr-4">
|
| 97 |
+
<i data-feather="edit" class="w-5 h-5 text-emerald-600"></i>
|
| 98 |
+
</div>
|
| 99 |
+
<div>
|
| 100 |
+
<h4 class="font-medium">Dr. Chen updated Quantum Physics syllabus</h4>
|
| 101 |
+
<p class="text-sm text-gray-500">2 hours ago</p>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="flex items-start p-4 hover:bg-gray-50 rounded-lg transition">
|
| 105 |
+
<div class="bg-blue-100 p-3 rounded-full mr-4">
|
| 106 |
+
<i data-feather="user-plus" class="w-5 h-5 text-blue-600"></i>
|
| 107 |
+
</div>
|
| 108 |
+
<div>
|
| 109 |
+
<h4 class="font-medium">12 new students enrolled in Nanotech program</h4>
|
| 110 |
+
<p class="text-sm text-gray-500">5 hours ago</p>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="flex items-start p-4 hover:bg-gray-50 rounded-lg transition">
|
| 114 |
+
<div class="bg-purple-100 p-3 rounded-full mr-4">
|
| 115 |
+
<i data-feather="alert-triangle" class="w-5 h-5 text-purple-600"></i>
|
| 116 |
+
</div>
|
| 117 |
+
<div>
|
| 118 |
+
<h4 class="font-medium">Attendance alert: Low participation in Robotics Lab</h4>
|
| 119 |
+
<p class="text-sm text-gray-500">Yesterday</p>
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
<div class="flex items-start p-4 hover:bg-gray-50 rounded-lg transition">
|
| 123 |
+
<div class="bg-amber-100 p-3 rounded-full mr-4">
|
| 124 |
+
<i data-feather="bar-chart-2" class="w-5 h-5 text-amber-600"></i>
|
| 125 |
+
</div>
|
| 126 |
+
<div>
|
| 127 |
+
<h4 class="font-medium">Midterm results published for AI Fundamentals</h4>
|
| 128 |
+
<p class="text-sm text-gray-500">2 days ago</p>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<!-- Quick Actions -->
|
| 135 |
+
<div class="glass-card rounded-xl shadow-lg p-6">
|
| 136 |
+
<h2 class="text-xl font-bold mb-6 text-indigo-900">Quick Actions</h2>
|
| 137 |
+
<div class="grid grid-cols-2 gap-4">
|
| 138 |
+
<a href="#" class="bg-indigo-100 hover:bg-indigo-200 rounded-lg p-4 text-center transition">
|
| 139 |
+
<i data-feather="user-plus" class="w-6 h-6 mx-auto text-indigo-700 mb-2"></i>
|
| 140 |
+
<span class="text-sm font-medium">Add Student</span>
|
| 141 |
+
</a>
|
| 142 |
+
<a href="#" class="bg-emerald-100 hover:bg-emerald-200 rounded-lg p-4 text-center transition">
|
| 143 |
+
<i data-feather="book" class="w-6 h-6 mx-auto text-emerald-700 mb-2"></i>
|
| 144 |
+
<span class="text-sm font-medium">New Course</span>
|
| 145 |
+
</a>
|
| 146 |
+
<a href="#" class="bg-blue-100 hover:bg-blue-200 rounded-lg p-4 text-center transition">
|
| 147 |
+
<i data-feather="file-text" class="w-6 h-6 mx-auto text-blue-700 mb-2"></i>
|
| 148 |
+
<span class="text-sm font-medium">Generate Report</span>
|
| 149 |
+
</a>
|
| 150 |
+
<a href="#" class="bg-purple-100 hover:bg-purple-200 rounded-lg p-4 text-center transition">
|
| 151 |
+
<i data-feather="calendar" class="w-6 h-6 mx-auto text-purple-700 mb-2"></i>
|
| 152 |
+
<span class="text-sm font-medium">Schedule</span>
|
| 153 |
+
</a>
|
| 154 |
+
<
|
| 155 |
+
</body>
|
| 156 |
+
</html>
|
students.html
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>BrainyBots | Student Management</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<style>
|
| 11 |
+
.neon-card {
|
| 12 |
+
background: rgba(15, 23, 42, 0.7);
|
| 13 |
+
backdrop-filter: blur(10px);
|
| 14 |
+
border: 1px solid rgba(94, 234, 212, 0.2);
|
| 15 |
+
transition: all 0.3s ease;
|
| 16 |
+
}
|
| 17 |
+
.neon-card:hover {
|
| 18 |
+
border-color: rgba(94, 234, 212, 0.5);
|
| 19 |
+
box-shadow: 0 0 15px rgba(94, 234, 212, 0.3);
|
| 20 |
+
}
|
| 21 |
+
.glow-text {
|
| 22 |
+
text-shadow: 0 0 8px rgba(94, 234, 212, 0.6);
|
| 23 |
+
}
|
| 24 |
+
</style>
|
| 25 |
+
</head>
|
| 26 |
+
<body class="bg-slate-900 text-gray-100 min-h-screen">
|
| 27 |
+
<div class="container mx-auto px-4 py-8">
|
| 28 |
+
<div class="flex justify-between items-center mb-8">
|
| 29 |
+
<h1 class="text-3xl font-bold text-teal-400 glow-text">BrainyBots Student Database</h1>
|
| 30 |
+
<button id="addStudentBtn" class="bg-teal-600 hover:bg-teal-500 text-white px-4 py-2 rounded-lg flex items-center">
|
| 31 |
+
<i data-feather="user-plus" class="mr-2"></i> Add Student
|
| 32 |
+
</button>
|
| 33 |
+
</div>
|
| 34 |
+
|
| 35 |
+
<!-- Search and Filters -->
|
| 36 |
+
<div class="neon-card rounded-xl p-6 mb-8">
|
| 37 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 38 |
+
<div>
|
| 39 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Search</label>
|
| 40 |
+
<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">
|
| 41 |
+
</div>
|
| 42 |
+
<div>
|
| 43 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Program</label>
|
| 44 |
+
<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">
|
| 45 |
+
<option>All Programs</option>
|
| 46 |
+
<option>Quantum Computing</option>
|
| 47 |
+
<option>Neural Networks</option>
|
| 48 |
+
<option>Robotics</option>
|
| 49 |
+
<option>Biotech</option>
|
| 50 |
+
</select>
|
| 51 |
+
</div>
|
| 52 |
+
<div>
|
| 53 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Status</label>
|
| 54 |
+
<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">
|
| 55 |
+
<option>All Students</option>
|
| 56 |
+
<option>Active</option>
|
| 57 |
+
<option>Graduated</option>
|
| 58 |
+
<option>On Leave</option>
|
| 59 |
+
</select>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<!-- Student Table -->
|
| 65 |
+
<div class="neon-card rounded-xl p-6 overflow-x-auto">
|
| 66 |
+
<table class="w-full">
|
| 67 |
+
<thead>
|
| 68 |
+
<tr class="border-b border-slate-700">
|
| 69 |
+
<th class="text-left py-3 px-4 text-teal-400">Student ID</th>
|
| 70 |
+
<th class="text-left py-3 px-4 text-teal-400">Full Name</th>
|
| 71 |
+
<th class="text-left py-3 px-4 text-teal-400">Program</th>
|
| 72 |
+
<th class="text-left py-3 px-4 text-teal-400">Enrollment Date</th>
|
| 73 |
+
<th class="text-left py-3 px-4 text-teal-400">Status</th>
|
| 74 |
+
<th class="text-right py-3 px-4 text-teal-400">Actions</th>
|
| 75 |
+
</tr>
|
| 76 |
+
</thead>
|
| 77 |
+
<tbody id="studentTableBody">
|
| 78 |
+
<!-- Student data will be loaded here -->
|
| 79 |
+
</tbody>
|
| 80 |
+
</table>
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
|
| 84 |
+
<!-- Add Student Modal -->
|
| 85 |
+
<div id="studentModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden">
|
| 86 |
+
<div class="bg-slate-800 rounded-xl p-6 w-full max-w-md">
|
| 87 |
+
<div class="flex justify-between items-center mb-4">
|
| 88 |
+
<h3 class="text-xl font-bold text-teal-400">Add New Student</h3>
|
| 89 |
+
<button id="closeModalBtn" class="text-gray-400 hover:text-white">
|
| 90 |
+
<i data-feather="x"></i>
|
| 91 |
+
</button>
|
| 92 |
+
</div>
|
| 93 |
+
<form id="studentForm" class="space-y-4">
|
| 94 |
+
<div>
|
| 95 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Full Name</label>
|
| 96 |
+
<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">
|
| 97 |
+
</div>
|
| 98 |
+
<div>
|
| 99 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Student ID</label>
|
| 100 |
+
<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">
|
| 101 |
+
</div>
|
| 102 |
+
<div>
|
| 103 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Program</label>
|
| 104 |
+
<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">
|
| 105 |
+
<option value="">Select Program</option>
|
| 106 |
+
<option>Quantum Computing</option>
|
| 107 |
+
<option>Neural Networks</option>
|
| 108 |
+
<option>Robotics</option>
|
| 109 |
+
<option>Biotech</option>
|
| 110 |
+
</select>
|
| 111 |
+
</div>
|
| 112 |
+
<div>
|
| 113 |
+
<label class="block text-sm font-medium mb-1 text-teal-300">Enrollment Date</label>
|
| 114 |
+
<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">
|
| 115 |
+
</div>
|
| 116 |
+
<div class="pt-4">
|
| 117 |
+
<button type="submit" class="w-full bg-teal-600 hover:bg-teal-500 text-white py-2 rounded-lg flex items-center justify-center">
|
| 118 |
+
<i data-feather="save" class="mr-2"></i> Save Student
|
| 119 |
+
</button>
|
| 120 |
+
</div>
|
| 121 |
+
</form>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<script>
|
| 126 |
+
feather.replace();
|
| 127 |
+
|
| 128 |
+
// Modal functionality
|
| 129 |
+
const modal = document.getElementById('studentModal');
|
| 130 |
+
const addBtn = document.getElementById('addStudentBtn');
|
| 131 |
+
const closeBtn = document.getElementById('closeModalBtn');
|
| 132 |
+
|
| 133 |
+
addBtn.addEventListener('click', () => modal.classList.remove('hidden'));
|
| 134 |
+
closeBtn.addEventListener('click', () => modal.classList.add('hidden'));
|
| 135 |
+
|
| 136 |
+
// Sample data - in a real app this would come from an API
|
| 137 |
+
const sampleStudents = [
|
| 138 |
+
{ id: 'QC-2023-001', name: 'Alex Turing', program: 'Quantum Computing', date: '2023-09-15', status: 'Active' },
|
| 139 |
+
{ id: 'NN-2023-042', name: 'Jamie Lovelace', program: 'Neural Networks', date: '2023-08-22', status: 'Active' },
|
| 140 |
+
{ id: 'RB-2023-017', name: 'Taylor Hopper', program: 'Robotics', date: '2023-07-30', status: 'On Leave' },
|
| 141 |
+
{ id: 'BT-2023-089', name: 'Riley Curie', program: 'Biotech', date: '2023-09-05', status: 'Active' }
|
| 142 |
+
];
|
| 143 |
+
|
| 144 |
+
// Render student table
|
| 145 |
+
function renderStudents() {
|
| 146 |
+
const tableBody = document.getElementById('studentTableBody');
|
| 147 |
+
tableBody.innerHTML = '';
|
| 148 |
+
|
| 149 |
+
sampleStudents.forEach(student => {
|
| 150 |
+
const row = document.createElement('tr');
|
| 151 |
+
row.className = 'border-b border-slate-700 hover:bg-slate-800';
|
| 152 |
+
row.innerHTML = `
|
| 153 |
+
<td class="py-3 px-4">${student.id}</td>
|
| 154 |
+
<td class="py-3 px-4">${student.name}</td>
|
| 155 |
+
<td class="py-3 px-4">${student.program}</td>
|
| 156 |
+
<td class="py-3 px-4">${student.date}</td>
|
| 157 |
+
<td class="py-3 px-4"><span class="px-2 py-1 rounded-full text-xs ${getStatusClass(student.status)}">${student.status}</span></td>
|
| 158 |
+
<td class="py-3 px-4 text-right">
|
| 159 |
+
<button class="text-teal-400 hover:text-teal-300 mr-3" onclick="viewStudent('${student.id}')">
|
| 160 |
+
<i data-feather="eye"></i>
|
| 161 |
+
</button>
|
| 162 |
+
<button class="text-blue-400 hover:text-blue-300 mr-3">
|
| 163 |
+
<i data-feather="edit"></i>
|
| 164 |
+
</button>
|
| 165 |
+
<button class="text-red-400 hover:text-red-300" onclick="deleteStudent('${student.id}')">
|
| 166 |
+
<i data-feather="trash-2"></i>
|
| 167 |
+
</button>
|
| 168 |
+
</td>
|
| 169 |
+
`;
|
| 170 |
+
tableBody.appendChild(row);
|
| 171 |
+
});
|
| 172 |
+
feather.replace();
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
function getStatusClass(status) {
|
| 176 |
+
switch(status) {
|
| 177 |
+
case 'Active': return 'bg-green-900 text-green-300';
|
| 178 |
+
case 'Graduated': return 'bg-purple-900 text-purple-300';
|
| 179 |
+
case 'On Leave': return 'bg-amber-900 text-amber-300';
|
| 180 |
+
default: return 'bg-gray-900 text-gray-300';
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
function viewStudent(id) {
|
| 185 |
+
alert(`Viewing student with ID: ${id}`);
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
function deleteStudent(id) {
|
| 189 |
+
if(confirm(`Are you sure you want to delete student ${id}?`)) {
|
| 190 |
+
alert(`Student ${id} deleted successfully!`);
|
| 191 |
+
// In a real app, you would call an API here
|
| 192 |
+
renderStudents();
|
| 193 |
+
}
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
// Initialize the page
|
| 197 |
+
document.addEventListener('DOMContentLoaded', renderStudents);
|
| 198 |
+
</script>
|
| 199 |
+
</body>
|
| 200 |
+
</html>
|