-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructions.html
More file actions
747 lines (663 loc) · 19 KB
/
instructions.html
File metadata and controls
747 lines (663 loc) · 19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Assessment Instructions | Parkinsense</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
background-color: #ffffff;
background-image:
linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
background-size: 50px 50px;
color: #1a1a1a;
line-height: 1.6;
height: 100vh;
padding: 0.5rem;
overflow: hidden;
position: relative;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at center, rgba(255, 255, 255, 1) 20%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 80%);
pointer-events: none;
z-index: 1;
}
/* Animated grid lights */
.grid-light {
position: fixed;
width: 8px;
height: 8px;
background: radial-gradient(circle, #888888 0%, rgba(136, 136, 136, 0.6) 50%, transparent 70%);
border-radius: 50%;
pointer-events: none;
z-index: 1;
opacity: 0.6;
}
.grid-light-1 {
top: 10%;
left: -10px;
animation: moveRightHorizontal 16s linear infinite, greenGlow 3.4s ease-in-out infinite;
}
.grid-light-2 {
top: 90%;
left: -10px;
animation: moveRightHorizontal 13s linear infinite, greenGlow 2.9s ease-in-out infinite;
animation-delay: 2.5s, 0.7s;
}
.grid-light-3 {
top: -10px;
left: 20%;
animation: moveDownVertical 14s linear infinite, greenGlow 3.1s ease-in-out infinite;
animation-delay: 1.2s, 1.8s;
}
.grid-light-4 {
bottom: -10px;
left: 80%;
animation: moveUpVertical 11s linear infinite, greenGlow 2.7s ease-in-out infinite;
animation-delay: 3.5s, 0.3s;
}
.grid-light-5 {
top: 50%;
right: -10px;
animation: moveLeftHorizontal 15s linear infinite, greenGlow 3.3s ease-in-out infinite;
animation-delay: 4s, 1.5s;
}
@keyframes moveRightHorizontal {
0% { left: -10px; }
100% { left: calc(100% + 10px); }
}
@keyframes moveLeftHorizontal {
0% { right: -10px; }
100% { right: calc(100% + 10px); }
}
@keyframes moveDownVertical {
0% { top: -10px; }
100% { top: calc(100% + 10px); }
}
@keyframes moveUpVertical {
0% { bottom: -10px; }
100% { bottom: calc(100% + 10px); }
}
@keyframes greenGlow {
0%, 70%, 100% {
background: radial-gradient(circle, #888888 0%, rgba(136, 136, 136, 0.6) 50%, transparent 70%);
box-shadow: 0 0 0 rgba(34, 197, 94, 0);
opacity: 0.6;
transform: scale(1);
}
15%, 55% {
background: radial-gradient(circle, #22c55e 0%, rgba(34, 197, 94, 0.8) 50%, rgba(34, 197, 94, 0.2) 70%);
box-shadow: 0 0 15px rgba(34, 197, 94, 0.8), 0 0 30px rgba(34, 197, 94, 0.4);
opacity: 1;
transform: scale(1.3);
}
}
.container {
max-width: 1000px;
height: calc(100vh - 1rem);
margin: 0 auto;
position: relative;
z-index: 2;
display: grid;
grid-template-rows: auto 1fr auto;
gap: 0.25rem;
}
.header {
text-align: center;
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
padding: 0.25rem;
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.12),
0 2px 16px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(20px);
position: relative;
overflow: hidden;
}
.header::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
animation: headerShimmer 8s ease-in-out infinite;
}
@keyframes headerShimmer {
0%, 90%, 100% { left: -100%; }
45% { left: 100%; }
}
.subtitle {
font-size: 1.4rem;
color: #4a4a4a;
margin-top: 0.1rem;
font-weight: 400;
}
h1 {
font-size: 3.5rem;
font-weight: 400;
color: #1a1a1a;
letter-spacing: -0.02em;
}
.tabs {
display: none;
}
.tab {
flex: 1;
padding: 0.75rem 1rem;
background: transparent;
border: none;
border-radius: 10px;
cursor: pointer;
font-size: 1rem;
font-weight: 500;
color: #6b7280;
transition: all 0.2s ease;
font-family: inherit;
}
.tab.active {
background: white;
color: #1a1a1a;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.main-content {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
padding: 0.5rem;
box-shadow:
0 12px 40px rgba(0, 0, 0, 0.15),
0 4px 20px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.15);
backdrop-filter: blur(20px);
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.main-content::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
animation: topGlow 6s ease-in-out infinite;
}
@keyframes topGlow {
0%, 70%, 100% { opacity: 0; }
35% { opacity: 1; }
}
.tab-content {
display: none;
flex: 1;
flex-direction: column;
height: 100%;
}
.tab-content.active {
display: flex;
}
/* Video Tab */
.video-section {
display: flex;
flex-direction: column;
height: 100%;
gap: 0.5rem;
}
.progress-container {
flex-shrink: 0;
}
.progress-bar {
width: 100%;
height: 6px;
background-color: #e5e7eb;
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.25rem;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
width: 0%;
transition: width 0.3s ease;
border-radius: 3px;
}
.progress-text {
text-align: center;
font-size: 0.8rem;
color: #6b7280;
font-weight: 500;
}
.video-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
border-radius: 10px;
overflow: hidden;
box-shadow:
0 8px 30px rgba(0, 0, 0, 0.2),
0 4px 15px rgba(0, 0, 0, 0.1),
0 0 0 1px rgba(255, 255, 255, 0.1);
border: 1px solid rgba(0, 0, 0, 0.1);
flex-shrink: 0;
}
.video-container::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 163, 74, 0.3));
border-radius: 12px;
z-index: -1;
opacity: 0;
animation: videoPulse 10s ease-in-out infinite;
}
@keyframes videoPulse {
0%, 85%, 100% { opacity: 0; }
42.5% { opacity: 1; }
}
.video-container #player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 10px;
}
.video-description {
display: none;
}
/* Steps Tab */
.steps-content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem 0;
}
.steps {
list-style: none;
counter-reset: step-counter;
position: relative;
max-width: 100%;
width: 100%;
}
/* Vertical connecting line */
.steps::before {
content: '';
position: absolute;
left: 50%;
top: 1.4rem;
height: calc(100% - 2.8rem);
width: 4px;
background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
z-index: 0;
transform: translateX(-50%);
border-radius: 2px;
overflow: hidden;
}
/* Animated glow effect */
.steps::after {
content: '';
position: absolute;
left: 50%;
top: 1.4rem;
width: 16px;
height: 16px;
background: radial-gradient(
circle,
rgba(134, 239, 172, 0.9) 0%,
rgba(34, 197, 94, 0.6) 30%,
rgba(34, 197, 94, 0.2) 60%,
transparent 100%
);
z-index: 0.5;
transform: translateX(-50%);
border-radius: 50%;
animation: circularGlowDown 4s ease-in-out infinite;
box-shadow: 0 0 12px rgba(34, 197, 94, 0.7), 0 0 20px rgba(34, 197, 94, 0.4);
}
@keyframes circularGlowDown {
0% {
opacity: 0;
top: 1.4rem;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
opacity: 0;
top: calc(100% - 1.4rem);
}
}
.step {
counter-increment: step-counter;
display: flex;
align-items: flex-start;
margin-bottom: 1.5rem;
padding: 1.2rem;
background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
border-radius: 12px;
border-left: 4px solid #22c55e;
position: relative;
box-shadow:
0 4px 16px rgba(0, 0, 0, 0.08),
0 2px 8px rgba(0, 0, 0, 0.04),
inset 0 1px 0 rgba(255, 255, 255, 0.5);
z-index: 1;
transition: all 0.3s ease;
}
.step:hover {
transform: translateY(-2px);
box-shadow:
0 8px 25px rgba(0, 0, 0, 0.12),
0 4px 12px rgba(0, 0, 0, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.5),
0 0 0 1px rgba(34, 197, 94, 0.1);
}
.step:last-child {
margin-bottom: 0;
}
.step::before {
content: counter(step-counter);
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
color: white;
width: 2.8rem;
height: 2.8rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 1.1rem;
margin-right: 1.5rem;
flex-shrink: 0;
position: relative;
z-index: 2;
box-shadow:
0 4px 12px rgba(34, 197, 94, 0.4),
0 2px 6px rgba(34, 197, 94, 0.2),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
}
.step:hover::before {
transform: scale(1.05);
box-shadow:
0 6px 20px rgba(34, 197, 94, 0.5),
0 3px 10px rgba(34, 197, 94, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.step-content {
font-size: 1.3rem;
line-height: 1.8;
}
.highlight {
background: linear-gradient(120deg, #a7f3d0 0%, #6ee7b7 100%);
padding: 0.15em 0.3em;
border-radius: 3px;
font-weight: 600;
color: #065f46;
}
.button-area {
text-align: center;
padding: 0.5rem 0;
}
.continue-button {
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
color: white;
border: none;
padding: 0.9rem 2.8rem;
font-size: 1.9rem;
font-weight: 600;
border-radius: 3rem;
cursor: pointer;
transition: all 0.3s ease;
font-family: inherit;
text-decoration: none;
display: inline-block;
box-shadow:
0 8px 25px rgba(34, 197, 94, 0.4),
0 4px 12px rgba(34, 197, 94, 0.2),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
position: relative;
overflow: hidden;
}
.continue-button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s ease;
}
.continue-button:hover::before {
left: 100%;
}
.continue-button:hover {
transform: translateY(-4px) scale(1.02);
box-shadow:
0 12px 35px rgba(34, 197, 94, 0.5),
0 6px 20px rgba(34, 197, 94, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.3),
0 0 0 1px rgba(34, 197, 94, 0.2);
}
.continue-button:active {
transform: translateY(-2px) scale(1.01);
}
@media (max-width: 768px) {
body {
padding: 0.5rem;
}
.container {
height: calc(100vh - 1rem);
}
h1 {
font-size: 1.5rem;
}
.continue-button {
width: 100%;
padding: 1rem 2rem;
}
}
</style>
</head>
<body>
<!-- Animated grid lights -->
<div class="grid-light grid-light-1"></div>
<div class="grid-light grid-light-2"></div>
<div class="grid-light grid-light-3"></div>
<div class="grid-light grid-light-4"></div>
<div class="grid-light grid-light-5"></div>
<div class="container">
<div class="header">
<h1>Instructions</h1>
<p class="subtitle">Watch this demonstration to learn the proper finger tapping technique</p>
</div>
<div class="main-content">
<!-- Video Tab -->
<div id="video" class="tab-content active">
<div class="video-section">
<div class="progress-container">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<div class="progress-text" id="progressText">Please watch the video: 0% completed.</div>
</div>
<div class="video-container">
<div id="player"></div>
</div>
</div>
</div>
<!-- Steps Tab -->
<div id="steps" class="tab-content">
<div class="steps-content">
<ol class="steps">
<li class="step">
<div class="step-content">
Position yourself comfortably with <span class="highlight">good lighting</span>. Ensure your palm is facing the camera and clearly visible in the camera view.
</div>
</li>
<li class="step">
<div class="step-content">
You will complete <span class="highlight">6 trials total</span> - each hand will be tested 3 times. Follow the on-screen prompts for which hand to use.
</div>
</li>
<li class="step">
<div class="step-content">
When each trial begins, tap your <span class="highlight">thumb and index finger</span> together as quickly and accurately as possible for <span class="highlight">15 seconds</span>.
</div>
</li>
<li class="step">
<div class="step-content">
Start with your fingers <span class="highlight">wide open</span>, then make clear, deliberate tapping movements. Maintain consistent amplitude throughout each trial.
</div>
</li>
<li class="step">
<div class="step-content">
Follow the visual guides on screen to position your hand correctly. The system will provide real-time feedback during the assessment.
</div>
</li>
</ol>
</div>
</div>
</div>
<div class="button-area">
<button class="continue-button" id="mainButton" onclick="showStepsTab()">
Continue
</button>
</div>
</div>
<!-- YouTube API Script -->
<script src="https://www.youtube.com/iframe_api"></script>
<script>
let player;
let progressInterval;
function showStepsTab() {
// Hide header when switching to steps
document.querySelector('.header').style.display = 'none';
// Adjust container to account for removed header
document.querySelector('.container').style.gridTemplateRows = '1fr auto';
// Switch to steps tab
switchTab('steps');
}
function switchTab(tabName) {
// Hide all tab contents
const contents = document.querySelectorAll('.tab-content');
contents.forEach(content => content.classList.remove('active'));
// Show selected tab content
document.getElementById(tabName).classList.add('active');
// Update button based on active tab
const button = document.getElementById('mainButton');
if (tabName === 'video') {
button.innerHTML = 'Continue';
button.onclick = showStepsTab;
} else if (tabName === 'steps') {
button.innerHTML = '<a href="experiment.html" style="color: inherit; text-decoration: none;">Start Assessment</a>';
button.onclick = null;
}
}
// YouTube API callback
function onYouTubeIframeAPIReady() {
// Clear any existing player
if (player && player.destroy) {
player.destroy();
}
// Small delay to ensure DOM is ready
setTimeout(() => {
player = new YT.Player('player', {
height: '100%',
width: '100%',
videoId: 'aq-vBvjhvt0',
playerVars: {
'playsinline': 1,
'rel': 0,
'modestbranding': 1
},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}, 100);
}
function onPlayerReady(event) {
// Player is ready
}
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING) {
startProgressTracking();
} else {
stopProgressTracking();
}
}
function startProgressTracking() {
progressInterval = setInterval(updateProgress, 500);
}
function stopProgressTracking() {
if (progressInterval) {
clearInterval(progressInterval);
}
}
function updateProgress() {
if (player && player.getCurrentTime && player.getDuration) {
const currentTime = player.getCurrentTime();
const duration = player.getDuration();
if (duration > 0) {
const percentage = (currentTime / duration) * 100;
const progressFill = document.getElementById('progressFill');
const progressText = document.getElementById('progressText');
if (progressFill && progressText) {
progressFill.style.width = percentage + '%';
progressText.textContent = 'Please watch the video: ' + Math.round(percentage) + '% completed.';
}
}
}
}
// Handle page visibility changes and reloads
document.addEventListener('visibilitychange', function() {
if (!document.hidden && player && player.getPlayerState) {
// Page became visible again, reinitialize if needed
setTimeout(() => {
if (player.getPlayerState() === -1 || player.getPlayerState() === 5) {
onYouTubeIframeAPIReady();
}
}, 500);
}
});
// Reinitialize on page load if player doesn't exist
window.addEventListener('load', function() {
setTimeout(() => {
if (!player || !player.getPlayerState) {
onYouTubeIframeAPIReady();
}
}, 1000);
});
</script>
</body>
</html>