Subh775 commited on
Commit
742e24c
·
verified ·
1 Parent(s): 6a60bd0

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +300 -181
templates/index.html CHANGED
@@ -5,194 +5,313 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Smart Attendance System</title>
7
  <style>
8
- * {
9
- margin: 0;
10
- padding: 0;
11
- box-sizing: border-box;
12
- }
13
-
14
- body {
15
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
16
- background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
17
- min-height: 100vh;
18
- color: #f1f5f9;
19
- padding: 20px;
20
- }
21
-
22
- .container {
23
- max-width: 1200px;
24
- margin: 0 auto;
25
- background: #1e293b;
26
- border-radius: 20px;
27
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
28
- }
29
-
30
- .header {
31
- background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
32
- color: white;
33
- padding: 30px;
34
- text-align: center;
35
- }
36
-
37
- .header h1 {
38
- font-size: 2.5rem;
39
- margin-bottom: 10px;
40
- font-weight: 600;
41
- }
42
-
43
- .header p {
44
- font-size: 1.1rem;
45
- opacity: 0.9;
46
- }
47
-
48
- .stats-grid {
49
- display: grid;
50
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
51
- gap: 20px;
52
- padding: 30px;
53
- background: #111827;
54
- }
55
-
56
- .stat-card {
57
- background: #1f2937;
58
- padding: 25px;
59
- border-radius: 15px;
60
- text-align: center;
61
- box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
62
- }
63
-
64
- .stat-number {
65
- font-size: 2.5rem;
66
- font-weight: bold;
67
- margin-bottom: 10px;
68
- }
69
-
70
- .stat-label {
71
- color: #cbd5e1;
72
- font-size: 1rem;
73
- text-transform: uppercase;
74
- letter-spacing: 0.5px;
75
- }
76
-
77
- .total { color: #60a5fa; }
78
- .present { color: #34d399; }
79
- .absent { color: #f87171; }
80
-
81
- .main-content {
82
- display: grid;
83
- grid-template-columns: 1fr 1fr;
84
- gap: 30px;
85
- padding: 30px;
86
- }
87
-
88
- .section {
89
- background: #1f2937;
90
- border-radius: 15px;
91
- padding: 30px;
92
- box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
93
- }
94
-
95
- .section h2 {
96
- color: #f3f4f6;
97
- margin-bottom: 20px;
98
- font-size: 1.5rem;
99
- font-weight: 600;
100
- }
101
-
102
- .camera-container #video {
103
- border: 3px solid #475569;
104
- border-radius: 10px;
105
- width: 100%;
106
- max-width: 400px;
107
- }
108
-
109
- .camera-overlay {
110
- border: 2px dashed #818cf8;
111
- }
112
-
113
- .btn {
114
- padding: 12px 24px;
115
- border: none;
116
- border-radius: 8px;
117
- font-size: 1rem;
118
- font-weight: 600;
119
- cursor: pointer;
120
- text-transform: uppercase;
121
- letter-spacing: 0.5px;
122
- }
123
-
124
- .btn-primary {
125
- background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
126
- color: white;
127
- }
128
-
129
- .btn-success {
130
- background: linear-gradient(135deg, #10b981 0%, #059669 100%);
131
- color: white;
132
- }
133
-
134
- .btn-danger {
135
- background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
136
- color: white;
137
- }
138
-
139
- .form-group label {
140
- color: #f1f5f9;
141
- }
142
-
143
- .form-group input {
144
- background-color: #0f172a;
145
- color: white;
146
- border: 2px solid #334155;
147
- }
148
-
149
- .form-group input:focus {
150
- border-color: #818cf8;
151
- }
152
-
153
- .time-display {
154
- background: #0f172a;
155
- color: #e0f2fe;
156
- font-family: 'Courier New', monospace;
157
- }
158
-
159
- .status-success {
160
- background: #064e3b;
161
- color: #a7f3d0;
162
- }
163
-
164
- .status-error {
165
- background: #7f1d1d;
166
- color: #fecaca;
167
- }
168
-
169
- .attendance-item {
170
- border-bottom: 1px solid #334155;
171
- }
172
-
173
- .attendance-name {
174
- color: #f3f4f6;
175
- }
176
-
177
- .attendance-time {
178
- color: #94a3b8;
179
- }
180
-
181
- .loading {
182
- color: #94a3b8;
183
- }
184
-
185
- @media (max-width: 768px) {
186
  .main-content {
187
- grid-template-columns: 1fr;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
 
190
  .btn {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  }
193
- }
194
- </style>
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  </head>
197
  <body>
198
  <div class="container">
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Smart Attendance System</title>
7
  <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
16
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
+ min-height: 100vh;
18
+ padding: 20px;
19
+ }
20
+
21
+ .container {
22
+ max-width: 1200px;
23
+ margin: 0 auto;
24
+ background: rgba(255, 255, 255, 0.95);
25
+ border-radius: 20px;
26
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
27
+ overflow: hidden;
28
+ backdrop-filter: blur(10px);
29
+ }
30
+
31
+ .header {
32
+ background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
33
+ color: white;
34
+ padding: 30px;
35
+ text-align: center;
36
+ }
37
+
38
+ .header h1 {
39
+ font-size: 2.5rem;
40
+ margin-bottom: 10px;
41
+ font-weight: 600;
42
+ }
43
+
44
+ .header p {
45
+ font-size: 1.1rem;
46
+ opacity: 0.9;
47
+ }
48
+
49
+ .stats-grid {
50
+ display: grid;
51
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
52
+ gap: 20px;
53
+ padding: 30px;
54
+ background: #f8fafc;
55
+ }
56
+
57
+ .stat-card {
58
+ background: white;
59
+ padding: 25px;
60
+ border-radius: 15px;
61
+ text-align: center;
62
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
63
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
64
+ }
65
+
66
+ .stat-card:hover {
67
+ transform: translateY(-5px);
68
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
69
+ }
70
+
71
+ .stat-number {
72
+ font-size: 2.5rem;
73
+ font-weight: bold;
74
+ margin-bottom: 10px;
75
+ }
76
+
77
+ .stat-label {
78
+ color: #64748b;
79
+ font-size: 1rem;
80
+ text-transform: uppercase;
81
+ letter-spacing: 0.5px;
82
+ }
83
+
84
+ .total { color: #3b82f6; }
85
+ .present { color: #10b981; }
86
+ .absent { color: #ef4444; }
87
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  .main-content {
89
+ display: grid;
90
+ grid-template-columns: 1fr 1fr;
91
+ gap: 30px;
92
+ padding: 30px;
93
+ }
94
+
95
+ .section {
96
+ background: white;
97
+ border-radius: 15px;
98
+ padding: 30px;
99
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
100
+ }
101
+
102
+ .section h2 {
103
+ color: #1e293b;
104
+ margin-bottom: 20px;
105
+ font-size: 1.5rem;
106
+ font-weight: 600;
107
+ }
108
+
109
+ .camera-container {
110
+ position: relative;
111
+ margin-bottom: 20px;
112
+ }
113
+
114
+ #video {
115
+ width: 100%;
116
+ max-width: 400px;
117
+ border-radius: 10px;
118
+ border: 3px solid #e2e8f0;
119
+ }
120
+
121
+ .camera-overlay {
122
+ position: absolute;
123
+ top: 50%;
124
+ left: 50%;
125
+ transform: translate(-50%, -50%);
126
+ width: 200px;
127
+ height: 200px;
128
+ border: 2px dashed #4f46e5;
129
+ border-radius: 50%;
130
+ pointer-events: none;
131
+ }
132
+
133
+ .controls {
134
+ display: flex;
135
+ gap: 10px;
136
+ margin-bottom: 20px;
137
+ flex-wrap: wrap;
138
  }
139
 
140
  .btn {
141
+ padding: 12px 24px;
142
+ border: none;
143
+ border-radius: 8px;
144
+ font-size: 1rem;
145
+ font-weight: 600;
146
+ cursor: pointer;
147
+ transition: all 0.3s ease;
148
+ text-transform: uppercase;
149
+ letter-spacing: 0.5px;
150
+ }
151
+
152
+ .btn-primary {
153
+ background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
154
+ color: white;
155
+ }
156
+
157
+ .btn-success {
158
+ background: linear-gradient(135deg, #10b981 0%, #059669 100%);
159
+ color: white;
160
+ }
161
+
162
+ .btn-danger {
163
+ background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
164
+ color: white;
165
+ }
166
+
167
+ .btn:hover {
168
+ transform: translateY(-2px);
169
+ box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
170
+ }
171
+
172
+ .btn:disabled {
173
+ opacity: 0.6;
174
+ cursor: not-allowed;
175
+ transform: none;
176
+ }
177
+
178
+ .form-group {
179
+ margin-bottom: 20px;
180
+ }
181
+
182
+ .form-group label {
183
+ display: block;
184
+ margin-bottom: 8px;
185
+ color: #374151;
186
+ font-weight: 600;
187
+ }
188
+
189
+ .form-group input {
190
  width: 100%;
191
+ padding: 12px;
192
+ border: 2px solid #e2e8f0;
193
+ border-radius: 8px;
194
+ font-size: 1rem;
195
+ transition: border-color 0.3s ease;
196
+ }
197
+
198
+ .form-group input:focus {
199
+ outline: none;
200
+ border-color: #4f46e5;
201
+ }
202
+
203
+ .status-message {
204
+ padding: 15px;
205
+ border-radius: 8px;
206
+ margin-bottom: 20px;
207
+ font-weight: 600;
208
+ text-align: center;
209
+ }
210
+
211
+ .status-success {
212
+ background: #dcfce7;
213
+ color: #166534;
214
+ border: 1px solid #bbf7d0;
215
+ }
216
+
217
+ .status-error {
218
+ background: #fef2f2;
219
+ color: #991b1b;
220
+ border: 1px solid #fecaca;
221
+ }
222
+
223
+ .attendance-list {
224
+ max-height: 400px;
225
+ overflow-y: auto;
226
+ }
227
+
228
+ .attendance-item {
229
+ display: flex;
230
+ justify-content: space-between;
231
+ align-items: center;
232
+ padding: 15px;
233
+ border-bottom: 1px solid #e2e8f0;
234
+ transition: background-color 0.3s ease;
235
+ }
236
+
237
+ .attendance-item:hover {
238
+ background: #f8fafc;
239
+ }
240
+
241
+ .attendance-item:last-child {
242
+ border-bottom: none;
243
  }
 
 
244
 
245
+ .attendance-name {
246
+ font-weight: 600;
247
+ color: #1e293b;
248
+ }
249
+
250
+ .attendance-time {
251
+ color: #64748b;
252
+ font-size: 0.9rem;
253
+ }
254
+
255
+ .time-display {
256
+ background: #f1f5f9;
257
+ padding: 10px;
258
+ border-radius: 8px;
259
+ text-align: center;
260
+ margin-bottom: 20px;
261
+ font-family: 'Courier New', monospace;
262
+ font-size: 1.1rem;
263
+ font-weight: bold;
264
+ color: #1e293b;
265
+ }
266
+
267
+ .loading {
268
+ text-align: center;
269
+ padding: 20px;
270
+ color: #64748b;
271
+ }
272
+
273
+ .spinner {
274
+ display: inline-block;
275
+ width: 20px;
276
+ height: 20px;
277
+ border: 3px solid #f3f3f3;
278
+ border-top: 3px solid #4f46e5;
279
+ border-radius: 50%;
280
+ animation: spin 1s linear infinite;
281
+ margin-right: 10px;
282
+ }
283
+
284
+ @keyframes spin {
285
+ 0% { transform: rotate(0deg); }
286
+ 100% { transform: rotate(360deg); }
287
+ }
288
+
289
+ @media (max-width: 768px) {
290
+ .main-content {
291
+ grid-template-columns: 1fr;
292
+ gap: 20px;
293
+ padding: 20px;
294
+ }
295
+
296
+ .stats-grid {
297
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
298
+ gap: 15px;
299
+ padding: 20px;
300
+ }
301
+
302
+ .header h1 {
303
+ font-size: 2rem;
304
+ }
305
+
306
+ .controls {
307
+ flex-direction: column;
308
+ }
309
+
310
+ .btn {
311
+ width: 100%;
312
+ }
313
+ }
314
+ </style>
315
  </head>
316
  <body>
317
  <div class="container">