-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.html
More file actions
615 lines (543 loc) · 21.9 KB
/
Copy pathpractice.html
File metadata and controls
615 lines (543 loc) · 21.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://cdnjs.cloudflare.com; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src https://fonts.gstatic.com; img-src 'self' https://*.googleusercontent.com; connect-src 'self' https://docs.google.com https://script.google.com https://*.googleusercontent.com; frame-src https://drive.google.com https://www.youtube.com; object-src 'none'; base-uri 'self'; form-action 'self'" />
<link rel="icon" href="assets/images/favicon.svg" type="image/svg+xml" />
<title>Practice — Soul of Voice Club</title>
<meta name="description" content="Breathing exercises and vocal warm-ups for Soul of Voice Club members." />
<!-- Open Graph -->
<meta property="og:title" content="Practice — Soul of Voice Club" />
<meta property="og:description" content="Breathing exercises and vocal warm-ups." />
<meta property="og:type" content="website" />
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,700;1,9..144,400&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap" rel="stylesheet" />
<!-- Styles -->
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/tokens.css" />
<link rel="stylesheet" href="css/main.css" />
<style>
/* ── Practice sections ─────────────────────────────────── */
.practice-section {
max-width: 600px;
margin: 0 auto var(--space-16);
text-align: center;
}
.practice-section__title {
font-family: var(--font-display);
font-size: 1.55rem;
font-weight: 700;
color: var(--color-text);
margin-bottom: var(--space-2);
}
.practice-section__desc {
color: var(--color-text-muted);
font-size: 0.95rem;
margin-bottom: var(--space-7);
}
/* ── Breathing triangle ────────────────────────────────── */
.breath-svg {
width: 100%;
max-width: 300px;
display: block;
margin: 0 auto var(--space-5);
}
.tri-base {
fill: none;
stroke: var(--color-border);
stroke-width: 2.5;
stroke-linejoin: round;
}
.tri-progress {
stroke-width: 5;
stroke-linecap: round;
fill: none;
}
.tri-dot {
fill: var(--color-primary);
transition: fill 0.35s ease;
}
.tri-phase-text {
font-family: var(--font-display);
font-size: 2.2rem;
font-weight: 700;
fill: var(--color-text);
}
.tri-count-text {
font-family: var(--font-body);
font-size: 1.5rem;
font-weight: 600;
fill: var(--color-text-muted);
}
.tri-hint {
font-family: var(--font-body);
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
fill: var(--color-text-muted);
opacity: 0.7;
}
/* ── Presets ───────────────────────────────────────────── */
.breath-presets {
display: flex;
justify-content: center;
gap: var(--space-2);
flex-wrap: wrap;
margin-bottom: var(--space-5);
}
.breath-preset {
background: var(--color-surface);
border: 1.5px solid var(--color-border);
border-radius: var(--radius-pill);
padding: var(--space-2) var(--space-4);
font-size: 0.875rem;
font-family: var(--font-body);
color: var(--color-text-muted);
cursor: pointer;
transition: all 0.15s;
}
.breath-preset:hover,
.breath-preset.active {
background: var(--color-primary);
border-color: var(--color-primary);
color: #fff;
font-weight: 600;
}
/* ── Timing adjusters ──────────────────────────────────── */
.timing-row {
display: flex;
justify-content: center;
gap: var(--space-7);
flex-wrap: wrap;
margin-bottom: var(--space-7);
}
.timing-group {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-2);
}
.timing-group__label {
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.07em;
font-weight: 600;
color: var(--color-text-muted);
}
.timing-controls {
display: flex;
align-items: center;
gap: var(--space-2);
}
.timing-adj {
width: 28px;
height: 28px;
border-radius: 50%;
border: 1.5px solid var(--color-border);
background: var(--color-surface);
font-size: 1.1rem;
line-height: 1;
cursor: pointer;
color: var(--color-text-muted);
display: flex;
align-items: center;
justify-content: center;
transition: border-color 0.15s, color 0.15s;
}
.timing-adj:hover { border-color: var(--color-primary); color: var(--color-primary); }
.timing-val {
font-size: 1.2rem;
font-weight: 700;
color: var(--color-text);
min-width: 1.6rem;
text-align: center;
}
.timing-unit {
font-size: 0.78rem;
color: var(--color-text-muted);
}
/* Start button */
#breath-start-btn[data-active] {
background: var(--color-text-muted);
border-color: var(--color-text-muted);
}
/* ── Warm-up grid ──────────────────────────────────────── */
.warmup-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-4);
max-width: 480px;
margin: 0 auto;
}
.warmup-btn--empty {
opacity: 0.4;
cursor: not-allowed;
}
.warmup-btn--empty:hover {
transform: none !important;
box-shadow: var(--shadow-card) !important;
border-color: var(--color-border) !important;
}
.warmup-btn {
background: var(--color-surface);
border: 1.5px solid var(--color-border);
border-radius: var(--radius-md);
padding: var(--space-5) var(--space-3);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-2);
font-family: var(--font-body);
box-shadow: var(--shadow-card);
transition: transform 0.18s, box-shadow 0.18s, border-color 0.15s;
}
.warmup-btn:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-hover);
border-color: var(--color-primary);
}
.warmup-btn__play {
font-size: 1.5rem;
color: var(--color-primary);
line-height: 1;
}
.warmup-btn__label {
font-size: 1rem;
font-weight: 700;
color: var(--color-text);
}
/* ── YouTube modal ─────────────────────────────────────── */
.modal {
position: fixed;
inset: 0;
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s;
}
.modal--open {
opacity: 1;
pointer-events: all;
}
.modal__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.88);
}
.modal__box {
position: relative;
z-index: 1;
width: min(92vw, 860px);
}
.modal__close {
position: absolute;
top: -2.4rem;
right: 0;
background: none;
border: none;
color: #fff;
font-size: 1.5rem;
cursor: pointer;
opacity: 0.75;
line-height: 1;
}
.modal__close:hover { opacity: 1; }
.modal__video {
position: relative;
padding-bottom: 56.25%;
height: 0;
background: #000;
border-radius: var(--radius-md);
overflow: hidden;
}
.modal__video iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: none;
}
/* ── Exhale timer ──────────────────────────────────────── */
.exhale-timer {
margin-top: var(--space-10);
padding-top: var(--space-8);
border-top: 1px solid var(--color-border);
}
.exhale-timer__title {
font-family: var(--font-display);
font-size: 1.15rem;
font-weight: 700;
color: var(--color-text);
margin-bottom: var(--space-2);
}
.exhale-timer__desc {
font-size: 0.88rem;
color: var(--color-text-muted);
margin-bottom: var(--space-6);
}
.exhale-display {
display: flex;
align-items: baseline;
justify-content: center;
gap: var(--space-2);
margin-bottom: var(--space-5);
line-height: 1;
}
.exhale-display__time {
font-family: var(--font-display);
font-size: 4.5rem;
font-weight: 700;
color: var(--color-text);
min-width: 5ch;
text-align: center;
transition: color 0.3s;
}
.exhale-display__time.running { color: var(--color-secondary); }
.exhale-display__unit {
font-size: 1.4rem;
color: var(--color-text-muted);
font-weight: 400;
padding-bottom: 0.2em;
}
.exhale-result {
margin-top: var(--space-5);
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-2);
}
.exhale-result__label {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.07em;
font-weight: 600;
color: var(--color-text-muted);
}
.exhale-result__value {
font-family: var(--font-display);
font-size: 2rem;
font-weight: 700;
color: var(--color-secondary);
}
.exhale-result__best {
font-size: 0.82rem;
color: var(--color-text-muted);
background: var(--color-surface-alt);
border-radius: var(--radius-pill);
padding: var(--space-1) var(--space-3);
}
/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
.warmup-grid { grid-template-columns: repeat(2, 1fr); }
.timing-row { gap: var(--space-5); }
}
@media (prefers-reduced-motion: reduce) {
.warmup-btn { transition: none; }
.warmup-btn:hover { transform: none; }
.tri-dot { transition: none; }
}
</style>
</head>
<body>
<noscript>
<div class="noscript-msg">This website requires JavaScript. Please enable JavaScript in your browser.</div>
</noscript>
<!-- Navigation -->
<nav class="nav">
<div class="container nav__inner">
<a href="index.html" class="nav__logo">🎙 <span>Soul of</span> Voice Club</a>
<div class="nav__links">
<a href="index.html" data-vi="Trang chủ" data-en="Home">Trang chủ</a>
<a href="members.html" data-vi="Thành viên" data-en="Members">Thành viên</a>
<a href="board.html" data-vi="Bảng thành tích" data-en="Progress Board">Bảng thành tích</a>
<a href="schedule.html" data-vi="Lịch hoạt động" data-en="Schedule">Lịch hoạt động</a>
<a href="finance.html" data-vi="Tài chính" data-en="Finance">Tài chính</a>
<a href="rules.html" data-vi="Nội quy" data-en="Rules">Nội quy</a>
<a href="practice.html" class="active" data-vi="Luyện tập" data-en="Practice">Luyện tập</a>
<a href="photos.html" data-vi="Ảnh & Video" data-en="Photos & Videos">Ảnh & Video</a>
</div>
<button class="lang-toggle" aria-label="Switch language" title="Switch to English">EN</button>
<button class="nav__hamburger" aria-label="Open navigation menu" aria-expanded="false" id="hamburger">
<span></span><span></span><span></span>
</button>
</div>
<div class="nav__mobile" id="mobile-menu" role="navigation" aria-label="Mobile navigation">
<a href="index.html" data-vi="Trang chủ" data-en="Home">Trang chủ</a>
<a href="members.html" data-vi="Thành viên" data-en="Members">Thành viên</a>
<a href="board.html" data-vi="Bảng thành tích" data-en="Progress Board">Bảng thành tích</a>
<a href="schedule.html" data-vi="Lịch hoạt động" data-en="Schedule">Lịch hoạt động</a>
<a href="finance.html" data-vi="Tài chính" data-en="Finance">Tài chính</a>
<a href="rules.html" data-vi="Nội quy" data-en="Rules">Nội quy</a>
<a href="practice.html" class="active" data-vi="Luyện tập" data-en="Practice">Luyện tập</a>
<a href="photos.html" data-vi="Ảnh & Video" data-en="Photos & Videos">Ảnh & Video</a>
</div>
</nav>
<main>
<div class="container">
<header class="page-header">
<h1 data-vi="Luyện Tập" data-en="Practice">Luyện Tập</h1>
<p data-vi-html="Bước 2 & 3 trong hành trình — làm chủ <strong>Breath</strong>, khám phá <strong>Voice</strong>." data-en-html="Steps 2 & 3 in the journey — master <strong>Breath</strong>, discover <strong>Voice</strong>.">Bước 2 & 3 trong hành trình — làm chủ <strong>Breath</strong>, khám phá <strong>Voice</strong>.</p>
</header>
<!-- ── SECTION 1: Breathing ─────────────────────────── -->
<section class="practice-section">
<h2 class="practice-section__title">🌬️ Breathing</h2>
<p class="practice-section__desc">Follow the dot around the triangle and breathe with it.</p>
<!-- Triangle SVG -->
<svg class="breath-svg" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg" aria-label="Breathing triangle">
<defs>
<filter id="dot-glow" x="-60%" y="-60%" width="220%" height="220%">
<feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur"/>
<feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
</filter>
</defs>
<!-- Base triangle outline -->
<polygon class="tri-base" points="150,24 284,258 16,258"/>
<!-- Phase progress lines (each grows as its phase plays) -->
<line id="progress-inhale" class="tri-progress" stroke="#81B29A" x1="16" y1="258" x2="16" y2="258" stroke-linecap="round"/>
<line id="progress-hold" class="tri-progress" stroke="#F2CC8F" x1="150" y1="24" x2="150" y2="24" stroke-linecap="round"/>
<line id="progress-exhale" class="tri-progress" stroke="#E07A5F" x1="284" y1="258" x2="284" y2="258" stroke-linecap="round"/>
<!-- Side hint labels (outside edges) -->
<text class="tri-hint" x="52" y="148" text-anchor="middle" transform="rotate(-61,52,148)" fill="#81B29A">INHALE</text>
<text class="tri-hint" x="248" y="148" text-anchor="middle" transform="rotate(61,248,148)" fill="#F2CC8F">HOLD</text>
<text class="tri-hint" x="150" y="282" text-anchor="middle" fill="#E07A5F">EXHALE</text>
<!-- Centre: phase name -->
<text id="breath-phase-label" class="tri-phase-text" x="150" y="160" text-anchor="middle" dominant-baseline="middle">Ready</text>
<!-- Centre: countdown number -->
<text id="breath-countdown" class="tri-count-text" x="150" y="202" text-anchor="middle" dominant-baseline="middle"></text>
<!-- Animated dot -->
<circle id="breath-dot" class="tri-dot" cx="16" cy="258" r="11"/>
</svg>
<!-- Presets -->
<div class="breath-presets">
<button class="breath-preset active" data-inhale="4" data-hold="4" data-exhale="4">4 – 4 – 4 Box</button>
<button class="breath-preset" data-inhale="4" data-hold="7" data-exhale="8">4 – 7 – 8 Calm</button>
<button class="breath-preset" data-inhale="5" data-hold="5" data-exhale="5">5 – 5 – 5</button>
<button class="breath-preset" data-inhale="6" data-hold="2" data-exhale="6">6 – 2 – 6 Active</button>
</div>
<!-- Custom timing adjusters -->
<div class="timing-row">
<div class="timing-group">
<span class="timing-group__label" style="color:#81B29A">Inhale</span>
<div class="timing-controls">
<button class="timing-adj" data-phase="0" data-delta="-1" aria-label="Decrease inhale">−</button>
<span class="timing-val" data-phase="0">4</span><span class="timing-unit">s</span>
<button class="timing-adj" data-phase="0" data-delta="1" aria-label="Increase inhale">+</button>
</div>
</div>
<div class="timing-group">
<span class="timing-group__label" style="color:#F2CC8F">Hold</span>
<div class="timing-controls">
<button class="timing-adj" data-phase="1" data-delta="-1" aria-label="Decrease hold">−</button>
<span class="timing-val" data-phase="1">4</span><span class="timing-unit">s</span>
<button class="timing-adj" data-phase="1" data-delta="1" aria-label="Increase hold">+</button>
</div>
</div>
<div class="timing-group">
<span class="timing-group__label" style="color:#E07A5F">Exhale</span>
<div class="timing-controls">
<button class="timing-adj" data-phase="2" data-delta="-1" aria-label="Decrease exhale">−</button>
<span class="timing-val" data-phase="2">4</span><span class="timing-unit">s</span>
<button class="timing-adj" data-phase="2" data-delta="1" aria-label="Increase exhale">+</button>
</div>
</div>
</div>
<button class="btn btn-primary" id="breath-start-btn">Start</button>
<!-- Exhale timer -->
<div class="exhale-timer">
<h3 class="exhale-timer__title">⏱️ Measure Your Exhale</h3>
<p class="exhale-timer__desc">Press Start, exhale as long as you can, then press Stop.</p>
<div class="exhale-display">
<span class="exhale-display__time" id="exhale-time">0.0</span>
<span class="exhale-display__unit">sec</span>
</div>
<button class="btn btn-outline" id="exhale-btn">Start</button>
<div class="exhale-result" id="exhale-result" hidden>
<span class="exhale-result__label">Your exhale</span>
<span class="exhale-result__value" id="exhale-result-val"></span>
<span class="exhale-result__best" id="exhale-best" hidden></span>
</div>
</div>
</section>
<!-- ── SECTION 2: Vocal Warm-Up ─────────────────────── -->
<section class="practice-section">
<h2 class="practice-section__title">🎤 Vocal Warm-Up</h2>
<p class="practice-section__desc">Choose how long you want to warm up. A video will open for you.</p>
<div class="warmup-grid" id="warmup-grid">
<button class="warmup-btn" data-yt-id="YCLyAmXtpfY" data-label="5 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">5 min</span>
</button>
<button class="warmup-btn" data-yt-id="ck1pzgy07ZU" data-label="10 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">10 min</span>
</button>
<button class="warmup-btn" data-yt-id="1f_SVJMRx5s" data-label="15 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">15 min</span>
</button>
<button class="warmup-btn" data-yt-id="3Q9tHGLzILQ" data-label="20 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">20 min</span>
</button>
<button class="warmup-btn" data-yt-id="zU4GoNtenxw" data-label="30 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">30 min</span>
</button>
<button class="warmup-btn" data-yt-id="0KGxK7nHWUc" data-label="40 min">
<span class="warmup-btn__play">▶</span>
<span class="warmup-btn__label">40 min</span>
</button>
</div>
</section>
</div><!-- /container -->
</main>
<!-- Footer -->
<footer class="footer">
<div class="container">
<p class="footer__name">🎙 Soul of Voice Club</p>
<p data-vi="Từ Tâm hồn đến Câu chuyện — qua từng hơi thở." data-en="From Soul to Story — through every breath.">Từ Tâm hồn đến Câu chuyện — qua từng hơi thở.</p>
<div class="footer__links">
<a href="index.html">Home</a>
<a href="members.html">Members</a>
<a href="board.html">Progress Board</a>
<a href="schedule.html">Schedule</a>
<a href="finance.html">Finance</a>
<a href="rules.html">Rules</a>
<a href="practice.html">Practice</a>
<a href="photos.html">Photos & Videos</a>
</div>
<p class="footer__copy">© 2026 Soul of Voice Club</p>
</div>
</footer>
<!-- YouTube modal -->
<div id="warmup-modal" class="modal" role="dialog" aria-modal="true" aria-label="Vocal warm-up video">
<div class="modal__backdrop"></div>
<div class="modal__box">
<button class="modal__close" id="warmup-close" aria-label="Close video">✕</button>
<div class="modal__video">
<iframe
id="warmup-iframe"
src=""
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
title="Vocal warm-up video"
></iframe>
</div>
</div>
</div>
<!-- Scripts -->
<script src="js/config.js"></script>
<script src="js/utils.js"></script>
<script src="js/practice.js"></script>
<script src="js/i18n.js"></script>
<script src="js/nav.js"></script>
</body>
</html>