-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
596 lines (575 loc) · 33.4 KB
/
Copy pathindex.html
File metadata and controls
596 lines (575 loc) · 33.4 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" id="themeColorMeta" content="#F2A2A2">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="ProgPomo">
<link rel="icon" href="images/favicon-32.png" sizes="32x32">
<link rel="icon" type="image/svg+xml" href="images/logo.svg">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<script>
try {
if (!localStorage.getItem('pp_landing_seen') &&
!window.matchMedia('(display-mode: standalone)').matches) {
location.replace('landing.html');
}
} catch (e) {}
</script>
<script>
// Apply the saved theme before first paint to avoid a FOUC flash.
// Mirrors THEME_META in js/themes.js — keep in sync.
try {
var T = {
pastel: ['#FDF9F1','#FFFFFF','#5C5449','#756B5C','#F2A2A2','#E89090','#F5EDE4','#F5EDE4','#FFFFFF','24px','12px'],
light: ['#F9FAFB','#FFFFFF','#1F2937','#6B7280','#6366F1','#4F46E5','#E5E7EB','#E5E7EB','#FFFFFF','16px','8px'],
zen: ['#F4F4F0','#FFFFFF','#222222','#7A7A7A','#555555','#333333','#EBEBEB','#E0E0DC','#FFFFFF','12px','6px'],
dark: ['#121212','#1E1E1E','#F3F4F6','#9CA3AF','#6366F1','#818CF8','#374151','#374151','#FFFFFF','20px','10px'],
desert: ['#FBF5DD','#E7E1B1','#530E0E','#7A5E45','#B46A2A','#934E1B','#EEDFB9','#DCCB9B','#FFFFFF','24px','12px'],
midnightSlate: ['#222831','#31363F','#EEEEEE','#A7B0BC','#5E969A','#5E969A','#3E4650','#3E4650','#FFFFFF','18px','10px']
};
var theme = localStorage.getItem('pp_theme_v1');
var c = T[theme];
if (c) {
var root = document.documentElement;
root.setAttribute('data-theme', theme);
root.style.setProperty('--bg', c[0]);
root.style.setProperty('--card', c[1]);
root.style.setProperty('--text', c[2]);
root.style.setProperty('--muted', c[3]);
root.style.setProperty('--accent', c[4]);
root.style.setProperty('--accent-hover', c[5]);
root.style.setProperty('--ring-bg', c[6]);
root.style.setProperty('--border', c[7]);
root.style.setProperty('--btn-text', c[8]);
root.style.setProperty('--radius', c[9]);
root.style.setProperty('--radius-sm', c[10]);
root.style.setProperty('color-scheme', (theme === 'dark' || theme === 'midnightSlate') ? 'dark' : 'light');
var meta = document.getElementById('themeColorMeta');
if (meta) meta.setAttribute('content', c[4]);
}
} catch (e) {}
</script>
<meta name="description" content="Free adaptive focus timer PWA using the Progressive Pomodoro technique. Start with a 2-minute warm-up, rate your focus, and build longer deep-work sessions.">
<meta property="og:title" content="Progressive Pomodoro">
<meta property="og:description" content="Adaptive focus timer PWA. Start with 2 min, rate your focus, build deeper work sessions over time.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://progpomo.pages.dev/">
<meta property="og:image" content="https://progpomo.pages.dev/images/og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Progressive Pomodoro, a free adaptive focus timer">
<meta property="og:site_name" content="Progressive Pomodoro">
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<title>Progressive Pomodoro: Free Adaptive Focus Timer</title>
<link rel="stylesheet" href="style.css">
<link rel="manifest" href="manifest.json">
<link rel="canonical" href="https://progpomo.pages.dev/">
<link rel="preload" href="fonts/nunito-latin.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="icons/Phosphor.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="icons/Phosphor-Fill.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="fonts/nunito.css">
<link rel="stylesheet" href="icons/regular.css">
<link rel="stylesheet" href="icons/fill.css">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Progressive Pomodoro",
"alternateName": "ProgPomo",
"url": "https://progpomo.pages.dev/",
"description": "Adaptive focus timer PWA. Start with 2 min, rate your focus, build deeper work sessions over time.",
"applicationCategory": "ProductivityApplication",
"operatingSystem": "Any",
"browserRequirements": "Requires JavaScript",
"inLanguage": "en",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"featureList": [
"Adaptive focus timer",
"Session rating system",
"Task management",
"Session history",
"Binaural beats",
"Works offline"
],
"sameAs": "https://github.com/Effectforward/Progressive-Pomodoro",
"license": "https://www.gnu.org/licenses/gpl-3.0.html",
"author": {
"@type": "Person",
"name": "Muhammad Ibraheem",
"url": "https://progpomo.pages.dev/about.html"
}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Muhammad Ibraheem",
"description": "IT student and developer. Builds free tools like the Progressive Pomodoro timer.",
"url": "https://progpomo.pages.dev/about.html",
"jobTitle": "IT student",
"sameAs": [
"https://github.com/Effectforward",
"https://www.linkedin.com/in/effectforward/"
]
}
</script>
</head>
<body data-theme="pastel">
<!-- Onboarding overlay (first visit only) -->
<div id="onboardingOverlay" class="onboarding-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="onboardingTitle">
<div class="onboarding-card">
<div class="onboarding-icon-wrap"><i class="ph-fill ph-timer"></i></div>
<h2 id="onboardingTitle" class="onboarding-title">Welcome to ProgPomo</h2>
<p class="onboarding-desc">Start with a 2-minute warm-up. After each session, rate your focus. Your timer adapts, gradually building toward deeper work.</p>
<div class="onboarding-steps">
<div class="onboarding-step"><span class="onboarding-step-num">1</span> Start a short session</div>
<div class="onboarding-step"><span class="onboarding-step-num">2</span> Rate how it went</div>
<div class="onboarding-step"><span class="onboarding-step-num">3</span> Watch your focus grow</div>
</div>
<button id="onboardingDismiss" class="primary-btn onboarding-btn">Got it</button>
</div>
</div>
<header class="site-header">
<div class="header-inner">
<div class="logo">
<h1>Progressive Pomodoro</h1>
</div>
<div class="header-actions">
<div class="beats-split-wrap">
<button id="beatsToggle" class="beats-split-toggle" title="Toggle binaural beats" aria-label="Toggle binaural beats" aria-pressed="false"><i class="ph ph-headphones"></i></button>
<button id="beatsChevron" class="beats-split-chevron" title="Beats settings" aria-label="Beats settings" aria-haspopup="true" aria-expanded="false"><i class="ph ph-caret-down"></i></button>
<div id="beatsPopover" class="beats-popover hidden">
<div class="beats-popover-header">
<span class="beats-popover-title">Binaural Beats</span>
<label class="beats-toggle-switch" title="Toggle binaural beats">
<input type="checkbox" id="beatsPopoverToggle" role="switch" aria-checked="false" aria-label="Toggle binaural beats">
<span class="beats-toggle-track"></span>
</label>
</div>
<div class="beats-popover-divider"></div>
<div class="beats-popover-presets" role="radiogroup" aria-label="Beat presets">
<button class="beats-popover-item" data-preset="beta" role="radio" aria-checked="false"><i class="ph-fill ph-target"></i><span class="beats-popover-item-text"><span class="beats-popover-item-name">Active Focus</span><span class="beats-popover-item-hz">14 Hz</span></span></button>
<button class="beats-popover-item" data-preset="alpha" role="radio" aria-checked="false"><i class="ph-fill ph-leaf"></i><span class="beats-popover-item-text"><span class="beats-popover-item-name">Calm Focus</span><span class="beats-popover-item-hz">10 Hz</span></span></button>
<button class="beats-popover-item" data-preset="theta" role="radio" aria-checked="false"><i class="ph-fill ph-moon"></i><span class="beats-popover-item-text"><span class="beats-popover-item-name">Meditation</span><span class="beats-popover-item-hz">6 Hz</span></span></button>
<button class="beats-popover-item" data-preset="gamma" role="radio" aria-checked="false"><i class="ph-fill ph-lightning"></i><span class="beats-popover-item-text"><span class="beats-popover-item-name">Peak Focus</span><span class="beats-popover-item-hz">40 Hz</span></span></button>
<button class="beats-popover-item" data-preset="delta" role="radio" aria-checked="false"><i class="ph-fill ph-moon-stars"></i><span class="beats-popover-item-text"><span class="beats-popover-item-name">Deep Sleep</span><span class="beats-popover-item-hz">2 Hz</span></span></button>
</div>
<div class="beats-popover-divider"></div>
<div class="beats-popover-custom">
<div class="beats-popover-freq-row">
<label class="beats-popover-freq-label" for="beatsPopLeftFreq">Left ear</label>
<input type="number" id="beatsPopLeftFreq" class="beats-popover-freq" min="20" max="2000" step="1" aria-label="Left ear frequency">
<span class="beats-popover-freq-unit">Hz</span>
</div>
<div class="beats-popover-freq-row">
<label class="beats-popover-freq-label" for="beatsPopRightFreq">Right ear</label>
<input type="number" id="beatsPopRightFreq" class="beats-popover-freq" min="20" max="2000" step="1" aria-label="Right ear frequency">
<span class="beats-popover-freq-unit">Hz</span>
</div>
<div class="beats-popover-beat-display" aria-live="polite">
<span id="beatsPopBeatFreq">= 14 Hz</span>
</div>
</div>
</div>
</div>
<a href="https://github.com/Effectforward/Progressive-Pomodoro" class="icon-btn" id="githubStarBtn" target="_blank" rel="noopener" aria-label="Star on GitHub"><i class="ph ph-github-logo"></i> <span>GitHub</span></a>
<button id="statsModalBtn" class="icon-btn"><i class="ph ph-chart-bar"></i> <span>Stats</span></button>
<button id="settingsBtn" class="icon-btn"><i class="ph ph-gear"></i> <span>Settings</span></button>
</div>
</div>
</header>
<main id="main">
<section class="timer-card">
<div class="mode-tabs">
<button class="mode-tab active" data-mode="focus">Focus</button>
<button class="mode-tab" data-mode="break">Break</button>
</div>
<div id="timerDisplay" class="timer-display">
<div class="ring-wrap">
<svg class="progress-ring" width="240" height="240" viewBox="0 0 120 120" aria-hidden="true">
<circle class="ring-bg" cx="60" cy="60" r="52" fill="none" stroke-width="6"></circle>
<circle class="ring" cx="60" cy="60" r="52" fill="none" stroke-width="6" stroke-linecap="round" stroke-dasharray="326.7" stroke-dashoffset="0"></circle>
</svg>
<div class="time" id="time" role="timer" aria-live="off" aria-atomic="true">02:00</div>
<div id="srStatus" class="sr-only" aria-live="polite" aria-atomic="true"></div>
</div>
<div class="controls">
<button id="toggleBtn" class="primary-btn"><i class="ph-fill ph-play"></i> Start</button>
<button id="resetBtn" class="secondary-btn icon-only" title="Reset current session (R)" aria-label="Reset timer"><i class="ph ph-arrow-counter-clockwise"></i></button>
</div>
</div>
<p class="progression-hint" id="progressionHint">Focus time grows as you rate your sessions</p>
<div class="rating hidden" id="rating" role="group" aria-label="Rate your focus session">
<p class="rating-label">However it went, that's a session done.</p>
<p class="rating-sub">How was your focus? <button type="button" class="rating-help" aria-label="What is this?" aria-expanded="false" aria-controls="ratingHelpTip"><i class="ph ph-question"></i></button></p>
<div class="rating-buttons">
<button data-rating="flow" class="rate-flow"><i class="ph-fill ph-fire"></i> Flow</button>
<button data-rating="focused" class="rate-focused"><i class="ph-fill ph-target"></i> Focused</button>
<button data-rating="good" class="rate-good"><i class="ph-fill ph-thumbs-up"></i> Fine</button>
<button data-rating="distracted" class="rate-distracted"><i class="ph-fill ph-cloud-fog"></i> Distracted</button>
</div>
<p id="ratingHelpTip" class="rating-help-tip" hidden>Your rating adapts your next session length. Flow stretches it, distraction shortens it.</p>
</div>
<div class="duration-picker hidden" id="durationPicker">
<p class="picker-label">Next session length</p>
<div class="picker-presets" id="pickerPresets">
<button type="button" class="preset-chip" data-min="25">25</button>
<button type="button" class="preset-chip" data-min="45">45</button>
<button type="button" class="preset-chip" data-min="50">50</button>
<button type="button" class="preset-chip" data-min="90">90</button>
</div>
<div class="picker-controls">
<button id="pickerMinus" class="picker-adjust" aria-label="Decrease"><i class="ph ph-minus"></i></button>
<div class="picker-value">
<label for="pickerMinutes" class="sr-only">Focus minutes</label>
<input type="number" id="pickerMinutes" class="picker-input" min="1" max="180" step="1" aria-label="Focus minutes">
</div>
<button id="pickerPlus" class="picker-adjust" aria-label="Increase"><i class="ph ph-plus"></i></button>
</div>
<div class="picker-actions">
<button id="pickerStartBtn" class="primary-btn"><i class="ph-fill ph-play"></i> Start Focus</button>
<button id="pickerBreakBtn" class="secondary-btn"><i class="ph-fill ph-coffee"></i> Take Break First</button>
</div>
</div>
<div id="restartBanner" class="restart-banner hidden">
<p class="restart-banner-label">Last session: <span id="lastSessionDurationDisplay">0</span> min</p>
<div class="restart-banner-actions">
<button id="restartBannerRestart" class="secondary-btn">Restart progression</button>
<button id="restartBannerContinue" class="primary-btn">Continue</button>
</div>
</div>
</section>
<div class="bottom-grid">
<section class="tasks-card glass-card" id="tasksCard">
<div class="card-header">
<h2><i class="ph ph-check-square-offset"></i> Tasks</h2>
<span class="card-hint" id="taskCount"></span>
</div>
<div class="task-progress-wrap hidden" id="taskProgressWrap" aria-hidden="true">
<div class="task-progress-bar">
<div class="task-progress-fill" id="taskProgressFill"></div>
</div>
</div>
<div class="task-controls">
<label for="taskInput" class="sr-only">New task</label>
<input id="taskInput" placeholder="Add a task, press enter" aria-label="New task" maxlength="500" />
<button id="addTaskBtn" class="icon-only primary-btn" aria-label="Add task"><i class="ph ph-plus"></i></button>
</div>
<ul id="taskList" class="task-list"></ul>
</section>
<section class="history-card glass-card" id="historyCard">
<div class="card-header">
<h2><i class="ph ph-clock-counter-clockwise"></i> History</h2>
<div class="card-header-right">
<button type="button" id="historyViewAllBtn" class="icon-btn" hidden><i class="ph ph-arrows-out"></i> <span>View all</span></button>
</div>
</div>
<ul id="sessionList" class="session-list"></ul>
</section>
</div>
</main>
<footer class="site-footer">
<p>Progressive Pomodoro is an adaptive focus timer. <a href="landing.html">About the technique</a> · <a href="about.html">About the developer</a>.</p>
</footer>
<div id="statsModal" class="modal stats-modal hidden" aria-hidden="true">
<div class="modal-content" role="dialog" aria-modal="true" aria-labelledby="statsModalTitle">
<div class="modal-header">
<h3 id="statsModalTitle"><i class="ph ph-chart-bar"></i> Stats</h3>
<div class="modal-header-actions">
<button type="button" id="statsModalCloseBtn" class="icon-only" aria-label="Close stats"><i class="ph ph-x"></i></button>
</div>
</div>
<div class="stats-modal-body">
<div id="statsModalKpis" class="stats-kpis"></div>
<div id="statsRatingInsight" class="stats-insight" hidden></div>
<div id="statsEncouragement" class="stats-encouragement" aria-live="polite"></div>
<h4 class="stats-heatmap-title">Last 12 months</h4>
<div class="stats-heatmap-scroll">
<div id="statsYearHeatmap" class="stats-heatmap" role="img" aria-label="Focus minutes per day, last 12 months"></div>
</div>
</div>
</div>
</div>
<div id="historyModal" class="modal history-modal hidden" aria-hidden="true">
<div class="modal-content" role="dialog" aria-modal="true" aria-labelledby="historyModalTitle">
<div class="modal-header">
<h3 id="historyModalTitle"><i class="ph ph-clock-counter-clockwise"></i> History</h3>
<div class="modal-header-actions">
<button type="button" id="historyModalCloseBtn" class="icon-only" aria-label="Close history"><i class="ph ph-x"></i></button>
</div>
</div>
<div class="history-modal-scroll">
<ul id="historyModalList" class="session-list"></ul>
</div>
</div>
</div>
<div id="settingsModal" class="modal hidden" aria-hidden="true">
<div class="modal-content" role="dialog" aria-modal="true" aria-labelledby="settingsTitle">
<div class="modal-header">
<h3 id="settingsTitle"><i class="ph ph-gear"></i> Settings</h3>
<div class="modal-header-actions">
<button type="button" id="settingsCloseBtn" class="icon-only" aria-label="Close settings"><i class="ph ph-x"></i></button>
</div>
</div>
<form id="settingsForm">
<div class="settings-body">
<!-- Sidebar tab bar (visible in sidebar mode) -->
<nav class="settings-tabs settings-tabs-sidebar" aria-label="Settings sections">
<button type="button" class="settings-tab-btn active" data-settings-tab="timer"><i class="ph ph-timer"></i> Timer</button>
<button type="button" class="settings-tab-btn" data-settings-tab="theme"><i class="ph ph-layout"></i> Layout</button>
<button type="button" class="settings-tab-btn" data-settings-tab="cards"><i class="ph ph-cards"></i> Cards</button>
<button type="button" class="settings-tab-btn" data-settings-tab="audio"><i class="ph ph-headphones"></i> Audio</button>
<button type="button" class="settings-tab-btn" data-settings-tab="data"><i class="ph ph-database"></i> Manage</button>
</nav>
<!-- Top tab bar (visible in top-tabs mode) -->
<nav class="settings-tabs settings-tabs-top" aria-label="Settings sections">
<button type="button" class="settings-tab-btn active" data-settings-tab="timer">Timer</button>
<button type="button" class="settings-tab-btn" data-settings-tab="theme">Layout</button>
<button type="button" class="settings-tab-btn" data-settings-tab="cards">Cards</button>
<button type="button" class="settings-tab-btn" data-settings-tab="audio">Audio</button>
<button type="button" class="settings-tab-btn" data-settings-tab="data">Manage</button>
</nav>
<div class="settings-panels">
<!-- Timer tab -->
<div class="settings-panel active" data-settings-panel="timer">
<label class="field-label">
Warm-up duration
<span class="field-row">
<input type="number" id="warmupInput" min="1" max="60" step="1">
<span class="field-hint">min</span>
</span>
</label>
<label class="field-label">
Break duration
<span class="field-row">
<input type="number" id="breakInput" min="1" max="30" step="1">
<span class="field-hint">min</span>
</span>
</label>
<label class="field-label">
Auto restart after
<span class="field-row">
<span class="select-wrap">
<select id="autoRestartSelect">
<option value="0">Off</option>
<option value="15">15 min</option>
<option value="30">30 min</option>
<option value="45">45 min</option>
<option value="60">60 min</option>
<option value="90">90 min</option>
<option value="120">120 min</option>
<option value="custom">Custom</option>
</select>
</span>
<input type="number" id="autoRestartCustom" class="field-hint-input" min="1" max="999" step="1" hidden>
<span class="field-hint" id="autoRestartHint">of inactivity</span>
</span>
</label>
<fieldset class="settings-fieldset">
<legend>Timer size</legend>
<div class="timer-size-grid" id="timerSizeGrid" role="radiogroup" aria-label="Timer size">
<button type="button" class="timer-size-btn" data-size="compact" role="radio" aria-checked="false">Compact</button>
<button type="button" class="timer-size-btn active" data-size="regular" role="radio" aria-checked="true">Regular</button>
<button type="button" class="timer-size-btn" data-size="large" role="radio" aria-checked="false">Large</button>
<button type="button" class="timer-size-btn" data-size="xl" role="radio" aria-checked="false">XL</button>
</div>
</fieldset>
</div>
<!-- Theme tab -->
<div class="settings-panel" data-settings-panel="theme">
<fieldset class="settings-fieldset">
<legend>Theme</legend>
<div class="theme-picker-grid" id="themePickerGrid">
<!-- populated by themes.js -->
</div>
</fieldset>
<fieldset class="settings-fieldset">
<legend>Settings layout</legend>
<div class="layout-picker">
<button type="button" class="layout-option active" data-layout="sidebar">
<i class="ph ph-columns"></i> Sidebar
</button>
<button type="button" class="layout-option" data-layout="top">
<i class="ph ph-rows"></i> Top tabs
</button>
</div>
</fieldset>
<fieldset class="settings-fieldset">
<legend>Card layout</legend>
<div class="card-setting-row">
<label class="toggle-label" title="Place the timer beside Tasks and History on wide screens">
<input type="checkbox" id="sideBySideLayout" checked aria-label="Side-by-side layout on desktop">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-columns"></i> Side-by-side layout</span>
</div>
</fieldset>
</div>
<!-- Cards tab -->
<div class="settings-panel" data-settings-panel="cards">
<fieldset class="settings-fieldset">
<legend>Visible cards</legend>
<div class="card-setting-row">
<label class="toggle-label" title="Show Tasks card">
<input type="checkbox" id="tasksCardVisible" checked aria-label="Show Tasks card">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-check-square-offset"></i> Tasks</span>
</div>
<div class="card-setting-row">
<label class="toggle-label" title="Show History card">
<input type="checkbox" id="historyCardVisible" checked aria-label="Show History card">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-clock-counter-clockwise"></i> History</span>
</div>
<div class="card-setting-row">
<label class="toggle-label" title="Show binaural beats controls in the header">
<input type="checkbox" id="showBeatsAutoStart" checked aria-label="Show beats controls">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-headphones"></i> Beats controls</span>
</div>
<div class="card-setting-row">
<label class="toggle-label" title="Show GitHub link in header">
<input type="checkbox" id="githubVisible" checked aria-label="Show GitHub link in header">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-github-logo"></i> GitHub link</span>
</div>
<div class="card-setting-row">
<label class="toggle-label" title="Show Stats button in header">
<input type="checkbox" id="statsVisible" checked aria-label="Show Stats button in header">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label"><i class="ph ph-chart-bar"></i> Stats button</span>
</div>
</fieldset>
</div>
<!-- Audio tab -->
<div class="settings-panel" data-settings-panel="audio">
<fieldset class="settings-fieldset">
<legend>Alarm</legend>
<div class="field-row">
<label class="select-wrap">
<select id="alarmSoundSelect" aria-label="Alarm sound">
<option value="chord">Soft chord</option>
<option value="bell">Gentle bell</option>
<option value="knock">Wooden knock</option>
<option value="chimes">Wind chimes</option>
<option value="marimba">Marimba duet</option>
</select>
</label>
<button type="button" id="alarmPreviewBtn" class="secondary-btn btn-sm" title="Preview alarm sound"><i class="ph ph-play"></i> Play</button>
</div>
</fieldset>
<fieldset class="settings-fieldset">
<legend>Binaural Beats</legend>
<div class="card-setting-row">
<label class="toggle-label" title="Auto-start binaural beats with focus session">
<input type="checkbox" id="beatsAutoStart" aria-label="Auto-start binaural beats">
<span class="toggle-track"></span>
</label>
<span class="card-setting-label">Auto-start with focus session</span>
</div>
<label class="field-label">
Preset
<span class="field-row">
<span class="select-wrap">
<select id="beatsPresetSelect">
<option value="delta">Deep Sleep (Delta, 1-4 Hz)</option>
<option value="theta">Meditation (Theta, 4-8 Hz)</option>
<option value="alpha">Calm Focus (Alpha, 8-13 Hz)</option>
<option value="beta">Active Focus (Beta, 13-30 Hz)</option>
<option value="gamma" selected>Peak Focus (Gamma, 30-100 Hz)</option>
</select>
</span>
</span>
</label>
<a href="https://www.healthline.com/health/binaural-beats" target="_blank" rel="noopener" class="field-hint-link">What are binaural beats?</a>
<label class="field-label">
Default left ear (carrier)
<span class="field-row">
<input type="number" id="beatsDefaultLeftFreq" class="field-input" min="20" max="2000" step="1" value="270">
<span class="field-hint">Hz</span>
<span class="field-hint">200–340 optimal</span>
</span>
</label>
<label class="field-label">
Default right ear
<span class="field-row">
<input type="number" id="beatsDefaultRightFreq" class="field-input" min="20" max="2000" step="1" value="284">
<span class="field-hint">Hz</span>
<span class="field-hint">beat = right − left</span>
</span>
</label>
<label class="field-label">
Volume
<span class="field-row">
<input type="range" id="beatsDefaultVolume" class="settings-slider" min="0" max="100" value="50">
<span class="field-hint" id="beatsDefaultVolumeLabel">50%</span>
</span>
</label>
</fieldset>
</div>
<!-- Data tab -->
<div class="settings-panel" data-settings-panel="data">
<fieldset class="settings-fieldset">
<legend>Progression</legend>
<button type="button" id="restartProgressionBtn" class="text-btn" title="Reset progression to 2 min without clearing history"><i class="ph ph-arrow-clockwise"></i> Restart Progression</button>
<div class="confirm-panel confirm-panel--restart hidden" id="restartConfirm">
<p>Reset to warm-up? Your history stays.</p>
<div class="confirm-panel-actions">
<button type="button" id="restartConfirmYes" class="secondary-btn btn-sm">Reset</button>
<button type="button" id="restartConfirmNo" class="icon-btn btn-sm">Cancel</button>
</div>
</div>
</fieldset>
<fieldset class="settings-fieldset">
<legend>History</legend>
<button type="button" id="clearHistoryBtn" class="text-btn" title="Delete session history log"><i class="ph ph-trash"></i> Clear History</button>
<div class="confirm-panel confirm-panel--clear hidden" id="clearConfirm">
<p>Clear your session history? Progression stays intact.</p>
<div class="confirm-panel-actions">
<button type="button" id="clearConfirmYes" class="secondary-btn btn-sm">Clear</button>
<button type="button" id="clearConfirmNo" class="icon-btn btn-sm">Cancel</button>
</div>
</div>
</fieldset>
<fieldset class="settings-fieldset">
<legend>Backup</legend>
<button type="button" id="exportSettingsBtn" class="text-btn" title="Download settings as a JSON file"><i class="ph ph-download-simple"></i> Export Settings</button>
<button type="button" id="importSettingsBtn" class="text-btn" title="Restore settings from a JSON file"><i class="ph ph-upload-simple"></i> Import Settings</button>
<label for="importSettingsFile" class="sr-only">Import settings file</label>
<input type="file" id="importSettingsFile" accept=".json,application/json" hidden>
<div class="confirm-panel confirm-panel--import hidden" id="importConfirm">
<p>Replace your current settings with this file?</p>
<div class="confirm-panel-actions">
<button type="button" id="importConfirmYes" class="secondary-btn btn-sm">Replace</button>
<button type="button" id="importConfirmNo" class="icon-btn btn-sm">Cancel</button>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class="modal-actions">
<button type="submit" id="settingsSaveBtn" class="primary-btn"><i class="ph ph-check"></i> Save</button>
</div>
</form>
</div>
</div>
<div id="toast" class="toast" role="status" aria-live="polite" hidden></div>
<script type="module" src="js/app.js"></script>
</body>
</html>