Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- templates/dashboard.html +65 -0
- templates/login.html +37 -0
templates/dashboard.html
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Dashboard | KV Student Data</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
</head>
|
| 9 |
+
<body class="bg-gray-50 min-h-screen font-sans">
|
| 10 |
+
|
| 11 |
+
<nav class="bg-blue-600 text-white p-4 flex justify-between items-center shadow-md">
|
| 12 |
+
<h1 class="text-xl font-semibold">KV Student Dashboard</h1>
|
| 13 |
+
<div>
|
| 14 |
+
<a href="{{ url_for('download') }}"
|
| 15 |
+
class="bg-white text-blue-600 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-100 mr-2">
|
| 16 |
+
⬇ Download Excel
|
| 17 |
+
</a>
|
| 18 |
+
<a href="{{ url_for('logout') }}"
|
| 19 |
+
class="bg-red-500 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-600">
|
| 20 |
+
Logout
|
| 21 |
+
</a>
|
| 22 |
+
</div>
|
| 23 |
+
</nav>
|
| 24 |
+
|
| 25 |
+
<main class="p-6">
|
| 26 |
+
{% if data %}
|
| 27 |
+
<div class="overflow-x-auto rounded-lg shadow">
|
| 28 |
+
<table class="min-w-full bg-white">
|
| 29 |
+
<thead class="bg-blue-100 text-gray-700">
|
| 30 |
+
<tr>
|
| 31 |
+
<th class="py-3 px-4 text-left">Name</th>
|
| 32 |
+
<th class="py-3 px-4 text-left">DOB</th>
|
| 33 |
+
<th class="py-3 px-4 text-left">UBI ID</th>
|
| 34 |
+
<th class="py-3 px-4 text-left">Class</th>
|
| 35 |
+
<th class="py-3 px-4 text-left">School</th>
|
| 36 |
+
<th class="py-3 px-4 text-left">Enrolled</th>
|
| 37 |
+
</tr>
|
| 38 |
+
</thead>
|
| 39 |
+
<tbody>
|
| 40 |
+
{% for student in data %}
|
| 41 |
+
<tr class="border-t hover:bg-gray-50">
|
| 42 |
+
<td class="py-2 px-4">{{ student.name }}</td>
|
| 43 |
+
<td class="py-2 px-4">{{ student.dob }}</td>
|
| 44 |
+
<td class="py-2 px-4">{{ student.ubiId }}</td>
|
| 45 |
+
<td class="py-2 px-4">{{ student.class }}</td>
|
| 46 |
+
<td class="py-2 px-4">{{ student.school }}</td>
|
| 47 |
+
<td class="py-2 px-4">
|
| 48 |
+
{% if student.enrolled == "Yes" %}
|
| 49 |
+
<span class="text-green-600 font-semibold">Yes</span>
|
| 50 |
+
{% else %}
|
| 51 |
+
<span class="text-red-500 font-semibold">No</span>
|
| 52 |
+
{% endif %}
|
| 53 |
+
</td>
|
| 54 |
+
</tr>
|
| 55 |
+
{% endfor %}
|
| 56 |
+
</tbody>
|
| 57 |
+
</table>
|
| 58 |
+
</div>
|
| 59 |
+
{% else %}
|
| 60 |
+
<p class="text-center text-gray-500 mt-10 text-lg">No student data available yet. Please wait while it's being collected.</p>
|
| 61 |
+
{% endif %}
|
| 62 |
+
</main>
|
| 63 |
+
|
| 64 |
+
</body>
|
| 65 |
+
</html>
|
templates/login.html
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Login | KV Student Dashboard</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
</head>
|
| 9 |
+
<body class="bg-gradient-to-br from-blue-50 to-blue-100 h-screen flex items-center justify-center font-sans">
|
| 10 |
+
|
| 11 |
+
<div class="bg-white shadow-2xl rounded-2xl w-full max-w-sm p-8">
|
| 12 |
+
<h1 class="text-2xl font-semibold text-gray-800 text-center mb-6">Login to Dashboard</h1>
|
| 13 |
+
|
| 14 |
+
<form action="{{ url_for('login') }}" method="POST" class="space-y-4">
|
| 15 |
+
<div>
|
| 16 |
+
<label for="username" class="block text-sm font-medium text-gray-600 mb-1">Username</label>
|
| 17 |
+
<input type="text" id="username" name="username" required
|
| 18 |
+
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-400">
|
| 19 |
+
</div>
|
| 20 |
+
|
| 21 |
+
<div>
|
| 22 |
+
<label for="password" class="block text-sm font-medium text-gray-600 mb-1">Password</label>
|
| 23 |
+
<input type="password" id="password" name="password" required
|
| 24 |
+
class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-400">
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
<button type="submit"
|
| 28 |
+
class="w-full bg-blue-600 text-white py-2 rounded-lg hover:bg-blue-700 transition-colors">Login</button>
|
| 29 |
+
</form>
|
| 30 |
+
|
| 31 |
+
{% if error %}
|
| 32 |
+
<p class="text-red-500 text-sm mt-4 text-center">{{ error }}</p>
|
| 33 |
+
{% endif %}
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
</body>
|
| 37 |
+
</html>
|