undefined - Initial Deployment
Browse files- README.md +6 -4
- index.html +387 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: pink
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: zetech
|
| 3 |
+
emoji: 🐳
|
| 4 |
colorFrom: pink
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,387 @@
|
|
| 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" class="h-full">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Zetech University Attendance</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
/* Custom styles that can't be done with Tailwind */
|
| 11 |
+
.progress-ring__circle {
|
| 12 |
+
transition: stroke-dashoffset 0.5s;
|
| 13 |
+
transform: rotate(-90deg);
|
| 14 |
+
transform-origin: 50% 50%;
|
| 15 |
+
}
|
| 16 |
+
.drawer {
|
| 17 |
+
transition: transform 0.3s ease-in-out;
|
| 18 |
+
}
|
| 19 |
+
.drawer-closed {
|
| 20 |
+
transform: translateX(-100%);
|
| 21 |
+
}
|
| 22 |
+
.drawer-open {
|
| 23 |
+
transform: translateX(0);
|
| 24 |
+
}
|
| 25 |
+
.face-scan-animation {
|
| 26 |
+
animation: pulse 2s infinite;
|
| 27 |
+
}
|
| 28 |
+
@keyframes pulse {
|
| 29 |
+
0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
|
| 30 |
+
70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
|
| 31 |
+
100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
|
| 32 |
+
}
|
| 33 |
+
</style>
|
| 34 |
+
</head>
|
| 35 |
+
<body class="bg-gray-100 h-full font-sans antialiased text-gray-800">
|
| 36 |
+
<!-- Mobile App Container -->
|
| 37 |
+
<div class="max-w-md mx-auto bg-white h-screen flex flex-col overflow-hidden shadow-xl relative">
|
| 38 |
+
<!-- Header -->
|
| 39 |
+
<header class="bg-blue-600 text-white p-4 flex items-center justify-between">
|
| 40 |
+
<button id="menu-btn" class="text-white focus:outline-none">
|
| 41 |
+
<i class="fas fa-bars text-xl"></i>
|
| 42 |
+
</button>
|
| 43 |
+
<div class="flex items-center">
|
| 44 |
+
<img src="https://via.placeholder.com/40" alt="Zetech Logo" class="h-8 w-8 mr-2 rounded-full">
|
| 45 |
+
<h1 class="font-bold text-lg">Zetech Attendance</h1>
|
| 46 |
+
</div>
|
| 47 |
+
<div class="w-8"></div> <!-- Spacer for balance -->
|
| 48 |
+
</header>
|
| 49 |
+
|
| 50 |
+
<!-- Navigation Drawer -->
|
| 51 |
+
<div id="drawer" class="drawer drawer-closed absolute top-0 left-0 h-full w-64 bg-white shadow-lg z-50">
|
| 52 |
+
<div class="p-4 bg-blue-600 text-white flex items-center">
|
| 53 |
+
<img src="https://via.placeholder.com/40" alt="User" class="h-10 w-10 rounded-full mr-3">
|
| 54 |
+
<div>
|
| 55 |
+
<p class="font-bold">John Doe</p>
|
| 56 |
+
<p class="text-xs opacity-80">Student ID: STU12345</p>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
<nav class="py-4">
|
| 60 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 61 |
+
<i class="fas fa-home mr-3 text-blue-500"></i>
|
| 62 |
+
<span>Dashboard</span>
|
| 63 |
+
</a>
|
| 64 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 65 |
+
<i class="fas fa-calendar-check mr-3 text-blue-500"></i>
|
| 66 |
+
<span>Attendance</span>
|
| 67 |
+
</a>
|
| 68 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 69 |
+
<i class="fas fa-file-alt mr-3 text-blue-500"></i>
|
| 70 |
+
<span>Reports</span>
|
| 71 |
+
</a>
|
| 72 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 73 |
+
<i class="fas fa-envelope mr-3 text-blue-500"></i>
|
| 74 |
+
<span>Absence Requests</span>
|
| 75 |
+
</a>
|
| 76 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 77 |
+
<i class="fas fa-cog mr-3 text-blue-50"></i>
|
| 78 |
+
<span>Settings</span>
|
| 79 |
+
</a>
|
| 80 |
+
<a href="#" class="flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50">
|
| 81 |
+
<i class="fas fa-sign-out-alt mr-3 text-red-500"></i>
|
| 82 |
+
<span>Logout</span>
|
| 83 |
+
</a>
|
| 84 |
+
</nav>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<!-- Main Content -->
|
| 88 |
+
<main class="flex-1 overflow-y-auto pb-20">
|
| 89 |
+
<!-- Attendance Overview -->
|
| 90 |
+
<section class="p-4">
|
| 91 |
+
<h2 class="text-xl font-bold mb-4">Attendance Overview</h2>
|
| 92 |
+
<div class="bg-white rounded-xl shadow p-6 mb-4">
|
| 93 |
+
<div class="flex justify-between items-center mb-4">
|
| 94 |
+
<div>
|
| 95 |
+
<h3 class="font-semibold text-gray-700">Current Attendance</h3>
|
| 96 |
+
<p class="text-sm text-gray-500">This Semester</p>
|
| 97 |
+
</div>
|
| 98 |
+
<div class="relative w-20 h-20">
|
| 99 |
+
<svg class="w-full h-full" viewBox="0 0 36 36">
|
| 100 |
+
<path
|
| 101 |
+
d="M18 2.0845
|
| 102 |
+
a 15.9155 15.9155 0 0 1 0 31.831
|
| 103 |
+
a 15.9155 15.9155 0 0 1 0 -31.831"
|
| 104 |
+
fill="none"
|
| 105 |
+
stroke="#e6e6e6"
|
| 106 |
+
stroke-width="3"
|
| 107 |
+
/>
|
| 108 |
+
<path
|
| 109 |
+
id="progress-ring"
|
| 110 |
+
class="progress-ring__circle"
|
| 111 |
+
d="M18 2.0845
|
| 112 |
+
a 15.9155 15.9155 0 0 1 0 31.831
|
| 113 |
+
a 15.9155 15.9155 0 0 1 0 -31.831"
|
| 114 |
+
fill="none"
|
| 115 |
+
stroke="#3b82f6"
|
| 116 |
+
stroke-width="3"
|
| 117 |
+
stroke-dasharray="85, 100"
|
| 118 |
+
/>
|
| 119 |
+
<text x="18" y="20.5" text-anchor="middle" font-size="10" fill="#3b82f6" font-weight="bold">85%</text>
|
| 120 |
+
</svg>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
<div class="grid grid-cols-2 gap-4">
|
| 124 |
+
<div class="bg-blue-50 p-3 rounded-lg">
|
| 125 |
+
<p class="text-sm text-gray-600">Attended</p>
|
| 126 |
+
<p class="font-bold text-blue-600">34</p>
|
| 127 |
+
</div>
|
| 128 |
+
<div class="bg-red-50 p-3 rounded-lg">
|
| 129 |
+
<p class="text-sm text-gray-600">Missed</p>
|
| 130 |
+
<p class="font-bold text-red-600">6</p>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
</section>
|
| 135 |
+
|
| 136 |
+
<!-- Next Class -->
|
| 137 |
+
<section class="p-4">
|
| 138 |
+
<h2 class="text-xl font-bold mb-4">Next Class</h2>
|
| 139 |
+
<div class="bg-white rounded-xl shadow p-4 mb-4">
|
| 140 |
+
<div class="flex items-start">
|
| 141 |
+
<div class="bg-blue-100 p-3 rounded-lg mr-4">
|
| 142 |
+
<i class="fas fa-book text-blue-600 text-xl"></i>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="flex-1">
|
| 145 |
+
<h3 class="font-bold">Advanced Programming</h3>
|
| 146 |
+
<p class="text-sm text-gray-600">Dr. Wambua</p>
|
| 147 |
+
<div class="flex items-center mt-2 text-sm">
|
| 148 |
+
<i class="fas fa-clock text-gray-500 mr-2"></i>
|
| 149 |
+
<span>10:00 AM - 12:00 PM</span>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="flex items-center mt-1 text-sm">
|
| 152 |
+
<i class="fas fa-map-marker-alt text-gray-500 mr-2"></i>
|
| 153 |
+
<span>Block A, Room 203</span>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
<div class="mt-4 flex justify-between">
|
| 158 |
+
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium flex items-center">
|
| 159 |
+
<i class="fas fa-bell mr-2"></i> Remind Me
|
| 160 |
+
</button>
|
| 161 |
+
<button class="border border-blue-600 text-blue-600 px-4 py-2 rounded-lg text-sm font-medium">
|
| 162 |
+
View Details
|
| 163 |
+
</button>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</section>
|
| 167 |
+
|
| 168 |
+
<!-- BLE Attendance Check-in -->
|
| 169 |
+
<section class="p-4" id="attendance-section">
|
| 170 |
+
<h2 class="text-xl font-bold mb-4">Check-in</h2>
|
| 171 |
+
<div class="bg-white rounded-xl shadow p-6 text-center">
|
| 172 |
+
<div class="mb-4">
|
| 173 |
+
<i class="fas fa-bluetooth-b text-blue-500 text-4xl mb-2"></i>
|
| 174 |
+
<h3 class="font-bold text-lg">Bluetooth Attendance</h3>
|
| 175 |
+
<p class="text-gray-600 text-sm">Automatically check-in when near class beacon</p>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div id="ble-status" class="mb-6">
|
| 179 |
+
<div class="inline-block bg-gray-100 px-4 py-2 rounded-full text-sm font-medium">
|
| 180 |
+
<i class="fas fa-circle-notch fa-spin mr-2"></i>
|
| 181 |
+
Scanning for beacons...
|
| 182 |
+
</div>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<div id="face-verification" class="hidden mb-6">
|
| 186 |
+
<div class="face-scan-animation mx-auto w-32 h-32 rounded-full border-4 border-blue-400 flex items-center justify-center mb-4">
|
| 187 |
+
<i class="fas fa-user text-4xl text-blue-500"></i>
|
| 188 |
+
</div>
|
| 189 |
+
<p class="text-gray-700 mb-4">Please look at your device for face verification</p>
|
| 190 |
+
<button id="cancel-verification" class="text-red-500 text-sm font-medium">Cancel</button>
|
| 191 |
+
</div>
|
| 192 |
+
|
| 193 |
+
<div id="manual-options" class="hidden">
|
| 194 |
+
<p class="text-gray-600 text-sm mb-4">BLE not detected? Try these options:</p>
|
| 195 |
+
<button class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium w-full mb-2">
|
| 196 |
+
<i class="fas fa-qrcode mr-2"></i> Scan QR Code
|
| 197 |
+
</button>
|
| 198 |
+
<button class="border border-blue-600 text-blue-600 px-4 py-2 rounded-lg text-sm font-medium w-full">
|
| 199 |
+
<i class="fas fa-user-tie mr-2"></i> Request Lecturer Check-in
|
| 200 |
+
</button>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
</section>
|
| 204 |
+
|
| 205 |
+
<!-- Quick Actions -->
|
| 206 |
+
<section class="p-4">
|
| 207 |
+
<h2 class="text-xl font-bold mb-4">Quick Actions</h2>
|
| 208 |
+
<div class="grid grid-cols-2 gap-4">
|
| 209 |
+
<button class="bg-white rounded-xl shadow p-4 text-center">
|
| 210 |
+
<div class="bg-green-100 p-3 rounded-full inline-block mb-2">
|
| 211 |
+
<i class="fas fa-file-alt text-green-600 text-xl"></i>
|
| 212 |
+
</div>
|
| 213 |
+
<p class="font-medium">Submit Absence</p>
|
| 214 |
+
</button>
|
| 215 |
+
<button class="bg-white rounded-xl shadow p-4 text-center">
|
| 216 |
+
<div class="bg-purple-100 p-3 rounded-full inline-block mb-2">
|
| 217 |
+
<i class="fas fa-chart-bar text-purple-600 text-xl"></i>
|
| 218 |
+
</div>
|
| 219 |
+
<p class="font-medium">View Reports</p>
|
| 220 |
+
</button>
|
| 221 |
+
<button class="bg-white rounded-xl shadow p-4 text-center">
|
| 222 |
+
<div class="bg-yellow-100 p-3 rounded-full inline-block mb-2">
|
| 223 |
+
<i class="fas fa-calendar-day text-yellow-600 text-xl"></i>
|
| 224 |
+
</div>
|
| 225 |
+
<p class="font-medium">Timetable</p>
|
| 226 |
+
</button>
|
| 227 |
+
<button class="bg-white rounded-xl shadow p-4 text-center">
|
| 228 |
+
<div class="bg-red-100 p-3 rounded-full inline-block mb-2">
|
| 229 |
+
<i class="fas fa-question-circle text-red-600 text-xl"></i>
|
| 230 |
+
</div>
|
| 231 |
+
<p class="font-medium">Help</p>
|
| 232 |
+
</button>
|
| 233 |
+
</div>
|
| 234 |
+
</section>
|
| 235 |
+
</main>
|
| 236 |
+
|
| 237 |
+
<!-- Bottom Navigation -->
|
| 238 |
+
<nav class="bg-white border-t border-gray-200 flex justify-around py-3 px-2 fixed bottom-0 w-full max-w-md">
|
| 239 |
+
<a href="#" class="text-blue-600 flex flex-col items-center">
|
| 240 |
+
<i class="fas fa-home text-xl"></i>
|
| 241 |
+
<span class="text-xs mt-1">Home</span>
|
| 242 |
+
</a>
|
| 243 |
+
<a href="#" class="text-gray-500 flex flex-col items-center">
|
| 244 |
+
<i class="fas fa-calendar-alt text-xl"></i>
|
| 245 |
+
<span class="text-xs mt-1">Schedule</span>
|
| 246 |
+
</a>
|
| 247 |
+
<a href="#" class="text-gray-500 flex flex-col items-center">
|
| 248 |
+
<i class="fas fa-file-alt text-xl"></i>
|
| 249 |
+
<span class="text-xs mt-1">Reports</span>
|
| 250 |
+
</a>
|
| 251 |
+
<a href="#" class="text-gray-500 flex flex-col items-center">
|
| 252 |
+
<i class="fas fa-user text-xl"></i>
|
| 253 |
+
<span class="text-xs mt-1">Profile</span>
|
| 254 |
+
</a>
|
| 255 |
+
</nav>
|
| 256 |
+
|
| 257 |
+
<!-- Notification Toast -->
|
| 258 |
+
<div id="toast" class="hidden fixed bottom-20 left-1/2 transform -translate-x-1/2 bg-gray-800 text-white px-4 py-2 rounded-lg shadow-lg">
|
| 259 |
+
<div class="flex items-center">
|
| 260 |
+
<i class="fas fa-bell mr-2"></i>
|
| 261 |
+
<span>Attendance recorded successfully!</span>
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<script>
|
| 267 |
+
// Toggle navigation drawer
|
| 268 |
+
document.getElementById('menu-btn').addEventListener('click', function() {
|
| 269 |
+
const drawer = document.getElementById('drawer');
|
| 270 |
+
drawer.classList.toggle('drawer-closed');
|
| 271 |
+
drawer.classList.toggle('drawer-open');
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
// Close drawer when clicking outside
|
| 275 |
+
document.addEventListener('click', function(event) {
|
| 276 |
+
const drawer = document.getElementById('drawer');
|
| 277 |
+
const menuBtn = document.getElementById('menu-btn');
|
| 278 |
+
|
| 279 |
+
if (!drawer.contains(event.target) && event.target !== menuBtn && !menuBtn.contains(event.target)) {
|
| 280 |
+
drawer.classList.add('drawer-closed');
|
| 281 |
+
drawer.classList.remove('drawer-open');
|
| 282 |
+
}
|
| 283 |
+
});
|
| 284 |
+
|
| 285 |
+
// Simulate BLE beacon detection
|
| 286 |
+
setTimeout(function() {
|
| 287 |
+
document.getElementById('ble-status').innerHTML = `
|
| 288 |
+
<div class="inline-block bg-green-100 px-4 py-2 rounded-full text-sm font-medium text-green-800">
|
| 289 |
+
<i class="fas fa-check-circle mr-2"></i>
|
| 290 |
+
Class beacon detected!
|
| 291 |
+
</div>
|
| 292 |
+
`;
|
| 293 |
+
|
| 294 |
+
// Show face verification
|
| 295 |
+
document.getElementById('face-verification').classList.remove('hidden');
|
| 296 |
+
|
| 297 |
+
// After verification, show success
|
| 298 |
+
setTimeout(function() {
|
| 299 |
+
document.getElementById('face-verification').innerHTML = `
|
| 300 |
+
<div class="mx-auto w-32 h-32 rounded-full border-4 border-green-400 flex items-center justify-center mb-4 bg-green-50">
|
| 301 |
+
<i class="fas fa-check text-4xl text-green-500"></i>
|
| 302 |
+
</div>
|
| 303 |
+
<p class="text-gray-700 mb-4 font-medium">Verification successful!</p>
|
| 304 |
+
<p class="text-sm text-gray-600">Attendance recorded for Advanced Programming</p>
|
| 305 |
+
`;
|
| 306 |
+
|
| 307 |
+
// Show toast notification
|
| 308 |
+
const toast = document.getElementById('toast');
|
| 309 |
+
toast.classList.remove('hidden');
|
| 310 |
+
setTimeout(() => toast.classList.add('hidden'), 3000);
|
| 311 |
+
|
| 312 |
+
// Reset after 3 seconds
|
| 313 |
+
setTimeout(resetAttendanceSection, 3000);
|
| 314 |
+
}, 2000);
|
| 315 |
+
}, 3000);
|
| 316 |
+
|
| 317 |
+
// Cancel verification
|
| 318 |
+
document.getElementById('cancel-verification').addEventListener('click', function() {
|
| 319 |
+
resetAttendanceSection();
|
| 320 |
+
document.getElementById('manual-options').classList.remove('hidden');
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
function resetAttendanceSection() {
|
| 324 |
+
document.getElementById('ble-status').innerHTML = `
|
| 325 |
+
<div class="inline-block bg-gray-100 px-4 py-2 rounded-full text-sm font-medium">
|
| 326 |
+
<i class="fas fa-circle-notch fa-spin mr-2"></i>
|
| 327 |
+
Scanning for beacons...
|
| 328 |
+
</div>
|
| 329 |
+
`;
|
| 330 |
+
document.getElementById('face-verification').classList.add('hidden');
|
| 331 |
+
document.getElementById('face-verification').innerHTML = `
|
| 332 |
+
<div class="face-scan-animation mx-auto w-32 h-32 rounded-full border-4 border-blue-400 flex items-center justify-center mb-4">
|
| 333 |
+
<i class="fas fa-user text-4xl text-blue-500"></i>
|
| 334 |
+
</div>
|
| 335 |
+
<p class="text-gray-700 mb-4">Please look at your device for face verification</p>
|
| 336 |
+
<button id="cancel-verification" class="text-red-500 text-sm font-medium">Cancel</button>
|
| 337 |
+
`;
|
| 338 |
+
document.getElementById('manual-options').classList.add('hidden');
|
| 339 |
+
|
| 340 |
+
// Reattach event listener for cancel button
|
| 341 |
+
document.getElementById('cancel-verification').addEventListener('click', function() {
|
| 342 |
+
resetAttendanceSection();
|
| 343 |
+
document.getElementById('manual-options').classList.remove('hidden');
|
| 344 |
+
});
|
| 345 |
+
|
| 346 |
+
// Simulate BLE detection again after 5 seconds
|
| 347 |
+
setTimeout(function() {
|
| 348 |
+
document.getElementById('ble-status').innerHTML = `
|
| 349 |
+
<div class="inline-block bg-green-100 px-4 py-2 rounded-full text-sm font-medium text-green-800">
|
| 350 |
+
<i class="fas fa-check-circle mr-2"></i>
|
| 351 |
+
Class beacon detected!
|
| 352 |
+
</div>
|
| 353 |
+
`;
|
| 354 |
+
document.getElementById('face-verification').classList.remove('hidden');
|
| 355 |
+
|
| 356 |
+
setTimeout(function() {
|
| 357 |
+
document.getElementById('face-verification').innerHTML = `
|
| 358 |
+
<div class="mx-auto w-32 h-32 rounded-full border-4 border-green-400 flex items-center justify-center mb-4 bg-green-50">
|
| 359 |
+
<i class="fas fa-check text-4xl text-green-500"></i>
|
| 360 |
+
</div>
|
| 361 |
+
<p class="text-gray-700 mb-4 font-medium">Verification successful!</p>
|
| 362 |
+
<p class="text-sm text-gray-600">Attendance recorded for Advanced Programming</p>
|
| 363 |
+
`;
|
| 364 |
+
|
| 365 |
+
const toast = document.getElementById('toast');
|
| 366 |
+
toast.classList.remove('hidden');
|
| 367 |
+
setTimeout(() => toast.classList.add('hidden'), 3000);
|
| 368 |
+
|
| 369 |
+
setTimeout(resetAttendanceSection, 3000);
|
| 370 |
+
}, 2000);
|
| 371 |
+
}, 5000);
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
// Dark mode toggle (simplified)
|
| 375 |
+
const darkModeToggle = document.createElement('button');
|
| 376 |
+
darkModeToggle.innerHTML = '<i class="fas fa-moon"></i>';
|
| 377 |
+
darkModeToggle.className = 'absolute top-4 right-4 text-white';
|
| 378 |
+
darkModeToggle.addEventListener('click', function() {
|
| 379 |
+
document.documentElement.classList.toggle('dark');
|
| 380 |
+
this.innerHTML = document.documentElement.classList.contains('dark')
|
| 381 |
+
? '<i class="fas fa-sun"></i>'
|
| 382 |
+
: '<i class="fas fa-moon"></i>';
|
| 383 |
+
});
|
| 384 |
+
document.body.appendChild(darkModeToggle);
|
| 385 |
+
</script>
|
| 386 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Maxie254/zetech" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 387 |
+
</html>
|