Sa-m commited on
Commit
6cfb32b
·
verified ·
1 Parent(s): bc03728

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +104 -422
index.html CHANGED
@@ -1,424 +1,106 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
6
- }
7
-
8
- body {
9
- background-color: #f5f5f5;
10
- color: #333;
11
- overflow-x: hidden;
12
- }
13
-
14
- .app-container {
15
- display: flex;
16
- flex-direction: column;
17
- height: 100vh;
18
- max-width: 1600px;
19
- margin: 0 auto;
20
- background-color: white;
21
- box-shadow: 0 0 20px rgba(0,0,0,0.1);
22
- }
23
-
24
- /* Header Styles */
25
- .header {
26
- display: flex;
27
- justify-content: space-between;
28
- align-items: center;
29
- padding: 15px 25px;
30
- background-color: #fff;
31
- border-bottom: 1px solid #e0e0e0;
32
- height: 60px;
33
- }
34
-
35
- .logo {
36
- display: flex;
37
- align-items: center;
38
- gap: 10px;
39
- font-size: 20px;
40
- font-weight: bold;
41
- color: #ea4335;
42
- }
43
-
44
- .logo i {
45
- font-size: 24px;
46
- }
47
-
48
- .search-bar {
49
- display: flex;
50
- align-items: center;
51
- background-color: #f1f3f4;
52
- border-radius: 24px;
53
- padding: 8px 16px;
54
- width: 300px;
55
- }
56
-
57
- .search-bar input {
58
- border: none;
59
- background: transparent;
60
- width: 100%;
61
- padding: 5px;
62
- font-size: 14px;
63
- outline: none;
64
- }
65
-
66
- /* Debug Toggle Button */
67
- .debug-toggle {
68
- margin-left: 20px;
69
- position: relative;
70
- }
71
-
72
- .debug-button {
73
- background-color: #f1f3f4;
74
- border: 1px solid #e0e0e0;
75
- border-radius: 50%;
76
- width: 30px;
77
- height: 30px;
78
- cursor: pointer;
79
- display: flex;
80
- align-items: center;
81
- justify-content: center;
82
- transition: all 0.3s ease;
83
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
84
- }
85
-
86
- .debug-button:hover {
87
- background-color: #e0e0e0;
88
- transform: scale(1.05);
89
- }
90
-
91
- /* Main Content Layout */
92
- .content {
93
- display: flex;
94
- flex: 1;
95
- overflow: hidden;
96
- }
97
-
98
- /* Email List Styles */
99
- .email-list {
100
- flex: 1;
101
- overflow-y: auto;
102
- border-right: 1px solid #e0e0e0;
103
- padding: 10px 20px;
104
- }
105
-
106
- .email-item {
107
- padding: 12px 0;
108
- border-bottom: 1px solid #f1f3f4;
109
- cursor: pointer;
110
- transition: background-color 0.2s;
111
- display: flex;
112
- justify-content: space-between;
113
- align-items: center;
114
- }
115
-
116
- .email-item:hover {
117
- background-color: #f8f9fa;
118
- }
119
-
120
- .email-item.selected {
121
- background-color: #e8f0fe;
122
- border-left: 4px solid #4285f4;
123
- }
124
-
125
- .email-header {
126
- display: flex;
127
- flex-direction: column;
128
- margin-right: 10px;
129
- min-width: 150px;
130
- }
131
-
132
- .email-sender {
133
- font-weight: bold;
134
- color: #202124;
135
- margin-bottom: 2px;
136
- font-size: 14px;
137
- }
138
-
139
- .email-time {
140
- color: #5f6368;
141
- font-size: 12px;
142
- }
143
-
144
- .email-subject {
145
- font-weight: 500;
146
- color: #202124;
147
- margin-bottom: 4px;
148
- font-size: 15px;
149
- flex: 1;
150
- white-space: nowrap;
151
- overflow: hidden;
152
- text-overflow: ellipsis;
153
- max-width: 500px;
154
- }
155
-
156
- .email-snippet {
157
- color: #5f6368;
158
- font-size: 13px;
159
- white-space: nowrap;
160
- overflow: hidden;
161
- text-overflow: ellipsis;
162
- flex: 2;
163
- max-width: 400px;
164
- }
165
-
166
- /* Webcam Overlay Styles */
167
- .webcam-container {
168
- position: fixed;
169
- bottom: 20px;
170
- right: 20px;
171
- width: 320px;
172
- height: 240px;
173
- border-radius: 12px;
174
- overflow: hidden;
175
- box-shadow: 0 4px 12px rgba(0,0,0,0.2);
176
- z-index: 100;
177
- background-color: #000;
178
- }
179
-
180
- #webcam {
181
- width: 100%;
182
- height: 100%;
183
- object-fit: cover;
184
- }
185
-
186
- .gesture-guide {
187
- position: fixed;
188
- bottom: 20px;
189
- left: 20px;
190
- background-color: rgba(0,0,0,0.7);
191
- color: white;
192
- padding: 15px;
193
- border-radius: 12px;
194
- max-width: 300px;
195
- z-index: 100;
196
- backdrop-filter: blur(5px);
197
- opacity: 0.9;
198
- transition: opacity 0.3s;
199
- }
200
-
201
- .gesture-guide:hover {
202
- opacity: 1;
203
- }
204
-
205
- .gesture-guide h3 {
206
- margin-bottom: 10px;
207
- color: #4285f4;
208
- }
209
-
210
- .gesture-item {
211
- display: flex;
212
- align-items: center;
213
- margin-bottom: 8px;
214
- }
215
-
216
- .gesture-icon {
217
- width: 30px;
218
- height: 30px;
219
- background-color: #4285f4;
220
- border-radius: 50%;
221
- display: flex;
222
- align-items: center;
223
- justify-content: center;
224
- margin-right: 10px;
225
- color: white;
226
- font-weight: bold;
227
- }
228
-
229
- /* Action Feedback */
230
- .action-feedback {
231
- position: fixed;
232
- top: 20px;
233
- left: 50%;
234
- transform: translateX(-50%);
235
- padding: 15px 25px;
236
- border-radius: 8px;
237
- color: white;
238
- font-weight: bold;
239
- z-index: 200;
240
- opacity: 0;
241
- transition: opacity 0.3s;
242
- min-width: 300px;
243
- text-align: center;
244
- }
245
-
246
- .action-feedback.show {
247
- opacity: 1;
248
- }
249
-
250
- .action-feedback.delete {
251
- background-color: #ea4335;
252
- }
253
-
254
- .action-feedback.archive {
255
- background-color: #34a853;
256
- }
257
-
258
- .action-feedback.summary {
259
- background-color: #4285f4;
260
- }
261
-
262
- /* Selected Email Highlight */
263
- .selection-highlight {
264
- position: absolute;
265
- border: 3px solid #4285f4;
266
- border-radius: 8px;
267
- pointer-events: none;
268
- z-index: 50;
269
- animation: pulse 1.5s infinite;
270
- background: rgba(66,133,244,0.03);
271
- }
272
-
273
- @keyframes pulse {
274
- 0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4); }
275
- 70% { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); }
276
- 100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
277
- }
278
-
279
- /* Gesture Visualization */
280
- .gesture-visualization {
281
- position: fixed;
282
- top: 0;
283
- left: 0;
284
- width: 100%;
285
- height: 100%;
286
- pointer-events: none;
287
- z-index: 40;
288
- }
289
-
290
- .hand-landmarks {
291
- position: absolute;
292
- width: 100%;
293
- height: 100%;
294
- }
295
-
296
- .hand-landmarks .landmark {
297
- position: absolute;
298
- width: 8px;
299
- height: 8px;
300
- background-color: #4285f4;
301
- border-radius: 50%;
302
- transform: translate(-50%, -50%);
303
- z-index: 100;
304
- }
305
-
306
- .hand-landmarks .landmark.index-tip {
307
- background-color: #34a853;
308
- width: 12px;
309
- height: 12px;
310
- }
311
-
312
- .gesture-path {
313
- position: absolute;
314
- width: 100%;
315
- height: 100%;
316
- }
317
-
318
- .gesture-path .point {
319
- position: absolute;
320
- width: 4px;
321
- height: 4px;
322
- background-color: #ff0000;
323
- border-radius: 50%;
324
- transform: translate(-50%, -50%);
325
- }
326
-
327
- /* Debug Panel */
328
- .debug-panel {
329
- position: fixed;
330
- top: 60px;
331
- right: 20px;
332
- background-color: rgba(0,0,0,0.8);
333
- color: #0f0;
334
- padding: 15px;
335
- border-radius: 12px;
336
- max-width: 300px;
337
- z-index: 100;
338
- backdrop-filter: blur(5px);
339
- opacity: 0;
340
- visibility: hidden;
341
- transition: all 0.3s ease;
342
- border: 1px solid rgba(255, 255, 255, 0.2);
343
- box-shadow: 0 4px 12px rgba(0,0,0,0.3);
344
- transform: translateY(-10px);
345
- }
346
-
347
- .debug-panel.visible {
348
- opacity: 1;
349
- visibility: visible;
350
- transform: translateY(0);
351
- }
352
-
353
- .debug-panel h3 {
354
- color: #4285f4;
355
- margin-bottom: 10px;
356
- }
357
-
358
- .debug-item {
359
- margin-bottom: 5px;
360
- }
361
-
362
- .debug-label {
363
- display: inline-block;
364
- width: 120px;
365
- color: #aaa;
366
- }
367
-
368
- .debug-value {
369
- color: #fff;
370
- }
371
-
372
- /* Status Indicator */
373
- .status-indicator {
374
- position: fixed;
375
- bottom: 30px;
376
- right: 30px;
377
- width: 20px;
378
- height: 20px;
379
- border-radius: 50%;
380
- z-index: 200;
381
- }
382
-
383
- .status-indicator.ready {
384
- background-color: #34a853;
385
- box-shadow: 0 0 10px #34a853;
386
- }
387
-
388
- .status-indicator.processing {
389
- background-color: #fbbc05;
390
- animation: blink 1s infinite;
391
- }
392
-
393
- .status-indicator.error {
394
- background-color: #ea4335;
395
- animation: blink 0.5s infinite;
396
- }
397
-
398
- @keyframes blink {
399
- 50% { opacity: 0.5; }
400
- }
401
-
402
- /* For mobile responsiveness */
403
- @media (max-width: 768px) {
404
- .webcam-container {
405
- width: 240px;
406
- height: 180px;
407
- bottom: 10px;
408
- right: 10px;
409
- }
410
-
411
- .gesture-guide, .debug-panel {
412
- max-width: 240px;
413
- font-size: 0.9em;
414
- padding: 10px;
415
- }
416
 
417
- .email-subject {
418
- max-width: 200px;
419
- }
 
420
 
421
- .email-snippet {
422
- max-width: 150px;
423
- }
424
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>GestureMail Pro</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <!-- MediaPipe Hands + Camera Utils -->
9
+ <script src="https://cdn.jsdelivr.net/npm/@mediapipe/[email protected]/hands.js" crossorigin="anonymous"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script>
11
+ </head>
12
+ <body>
13
+ <div class="app-container">
14
+ <div class="header">
15
+ <div class="logo">
16
+ <i>📧</i>
17
+ <span>GestureMail Pro</span>
18
+ </div>
19
+ <div class="search-bar">
20
+ <input type="text" placeholder="Search emails...">
21
+ </div>
22
+
23
+ <!-- Debug Toggle Button -->
24
+ <div class="debug-toggle" id="debugToggle">
25
+ <button class="debug-button">⚙️</button>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="content">
30
+ <div class="email-list" id="emailList">
31
+ <!-- Emails will be populated here -->
32
+ </div>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="webcam-container">
37
+ <video id="webcam" autoplay playsinline></video>
38
+ </div>
39
+
40
+ <div class="gesture-guide">
41
+ <h3>🖐️ Gesture Guide</h3>
42
+ <div class="gesture-item">
43
+ <div class="gesture-icon">1</div>
44
+ <div>Point to select an email</div>
45
+ </div>
46
+ <div class="gesture-item">
47
+ <div class="gesture-icon">←</div>
48
+ <div>Swipe left to delete</div>
49
+ </div>
50
+ <div class="gesture-item">
51
+ <div class="gesture-icon">→</div>
52
+ <div>Swipe right to archive</div>
53
+ </div>
54
+ <div class="gesture-item">
55
+ <div class="gesture-icon">◯</div>
56
+ <div>Draw circle for summary</div>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="action-feedback" id="actionFeedback"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
+ <div class="gesture-visualization">
63
+ <div class="hand-landmarks" id="handLandmarks"></div>
64
+ <div class="gesture-path" id="gesturePath"></div>
65
+ </div>
66
 
67
+ <div class="selection-highlight" id="selectionHighlight" style="display: none;"></div>
68
+
69
+ <!-- Debug Panel -->
70
+ <div class="debug-panel" id="debugPanel">
71
+ <h3>Debug Information</h3>
72
+ <div class="debug-item">
73
+ <span class="debug-label">Status:</span>
74
+ <span class="debug-value" id="debugStatus">Initializing...</span>
75
+ </div>
76
+ <div class="debug-item">
77
+ <span class="debug-label">Selected Email:</span>
78
+ <span class="debug-value" id="debugSelectedEmail">None</span>
79
+ </div>
80
+ <div class="debug-item">
81
+ <span class="debug-label">Gesture Type:</span>
82
+ <span class="debug-value" id="debugGestureType">None</span>
83
+ </div>
84
+ <div class="debug-item">
85
+ <span class="debug-label">Gesture Buffer:</span>
86
+ <span class="debug-value" id="debugBufferCount">0 points</span>
87
+ </div>
88
+ <div class="debug-item">
89
+ <span class="debug-label">Circle Points:</span>
90
+ <span class="debug-value" id="debugCircleCount">0 points</span>
91
+ </div>
92
+ <div class="debug-item">
93
+ <span class="debug-label">Camera:</span>
94
+ <span class="debug-value" id="debugCameraStatus">Not initialized</span>
95
+ </div>
96
+ <div class="debug-item">
97
+ <span class="debug-label">Last Error:</span>
98
+ <span class="debug-value" id="debugLastError">None</span>
99
+ </div>
100
+ </div>
101
+
102
+ <div class="status-indicator" id="statusIndicator"></div>
103
+
104
+ <script src="assets/js/script.js"></script>
105
+ </body>
106
+ </html>