-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
150 lines (150 loc) · 8.78 KB
/
index.html
File metadata and controls
150 lines (150 loc) · 8.78 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Couch to 5K Trainer</title>
<meta name="theme-color" content="#121212">
<link rel="manifest" href="manifest.json">
<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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="settings.css">
<link rel="stylesheet" href="nav.css">
</head>
<body>
<header>
<h1>Couch to 5K Trainer</h1>
<p>Get off the couch and run your first 5K in 9 weeks!</p>
</header>
<main>
<nav id="mainNav" aria-label="Primary navigation">
<button class="navBtn" type="button" data-section="home" aria-label="Home">
<span class="navIcon" aria-hidden="true">�</span>
<span class="navLabel">Home</span>
</button>
<button class="navBtn" type="button" data-section="schedule" aria-label="Schedule">
<span class="navIcon" aria-hidden="true">📅</span>
<span class="navLabel">Schedule</span>
</button>
<button class="navBtn" type="button" data-section="workout" aria-label="Workout">
<span class="navIcon" aria-hidden="true">🏃♂️</span>
<span class="navLabel">Workout</span>
</button>
<button class="navBtn" type="button" data-section="progress" aria-label="Progress">
<span class="navIcon" aria-hidden="true">📈</span>
<span class="navLabel">Progress</span>
</button>
</nav>
<section id="home" class="appSection">
<button id="openSettingsBtn" type="button" class="floatingSettingsBtn" aria-label="Open settings">⚙️</button>
<button id="installAppBtn" type="button" class="floatingInstallBtn" hidden aria-label="Install app">⬇️</button>
<button id="startBtn" type="button">Start Training</button>
<div class="reminderRow">
<label for="reminderTime">Set Daily Reminder:</label>
<input type="time" id="reminderTime">
<button id="setReminderBtn" type="button">Set Reminder</button>
</div>
</section>
<section id="schedule" class="appSection" hidden></section>
<section id="workout" class="appSection" hidden>
<div id="workoutInfo" class="workoutInfo">
<div id="intervalCue" aria-live="polite"></div>
<div id="timerDisplay"></div>
<div id="remainingIntervals" class="remainingIntervals" aria-live="polite" style="font-size:.8rem;opacity:.8;"></div>
<button id="startIntervalBtn" type="button">Start Workout</button>
<div id="intervalPlanWrap" class="intervalPlanWrap" hidden>
<div class="intervalPlanHeader">
<strong>Intervals</strong>
<span class="intervalTotalLabel">Total: <span id="intervalTotalTime">--:--</span></span>
<button id="toggleIntervalPlanBtn" type="button" class="secondaryBtn intervalPlanToggle" aria-expanded="true" aria-controls="intervalPlanList">Collapse</button>
</div>
<ul id="intervalPlanList" class="intervalPlanList" aria-label="Workout interval breakdown"></ul>
</div>
</div>
<div style="display:flex;justify-content:center;align-items:center;flex-direction:column;">
<canvas id="progressCanvas" width="140" height="140" style="display:none;margin-bottom:1em;"></canvas>
<div id="workoutControls" style="display:none;gap:0.5em;flex-wrap:wrap;justify-content:center;">
<button id="pauseWorkoutBtn" type="button">Pause Workout</button>
<button id="stopWorkoutBtn" type="button">Stop Workout</button>
<button id="skipIntervalBtn" type="button" class="secondaryBtn" aria-label="Skip current interval">Skip</button>
</div>
</div>
<div id="musicLauncher" class="musicLauncher">
<p class="musicHint">Optional: launch your music streaming service for motivation.</p>
<div class="musicOptions" id="musicOptions">
<button type="button" class="musicServiceBtn" data-service="spotify">Spotify</button>
<button type="button" class="musicServiceBtn" data-service="youtube">YouTube Music</button>
<button type="button" class="musicServiceBtn" data-service="apple">Apple Music</button>
</div>
<div id="launchMusicRow" class="launchMusicRow" hidden>
<span id="chosenMusicService" class="chosenMusicService"></span>
<div class="launchButtons">
<button id="launchMusicBtn" type="button">Open Music</button>
<button id="changeMusicServiceBtn" type="button" class="secondaryBtn">Change</button>
</div>
</div>
</div>
</section>
<section id="progress" class="appSection" hidden>
<div id="progressContent"></div>
<div style="text-align:center;margin:1em 0;display:flex;flex-direction:column;gap:.6em;">
<button id="shareProgressBtn" type="button">Share Progress</button>
<button id="shareImageBtn" type="button" class="secondaryBtn">Share as Image</button>
</div>
</section>
</main>
<div id="settingsPanel" role="dialog" aria-modal="true" aria-labelledby="settingsTitle" hidden>
<div class="settingsContent">
<h2 id="settingsTitle">Settings</h2>
<label for="timerSpeed">Timer Speed</label>
<input type="range" id="timerSpeed" min="0.5" max="2" step="0.1" value="1">
<span id="timerSpeedValue">1x</span>
<label for="soundVolume">Sound Volume</label>
<input type="range" id="soundVolume" min="0" max="1" step="0.01" value="0.2">
<span id="soundVolumeValue">20%</span>
<label for="colorTheme">Color Theme</label>
<select id="colorTheme">
<option value="dark">Dark</option>
<option value="bluegreen">Blue/Green</option>
<option value="light">Light</option>
</select>
<label for="beepToneSelect">Cue Sound</label>
<select id="beepToneSelect">
<option value="sine">Sine</option>
<option value="square">Square</option>
<option value="triangle">Triangle</option>
<option value="sawtooth">Saw</option>
</select>
<label for="avgPaceInput">Avg Pace (min/mi)</label>
<input type="number" id="avgPaceInput" min="5" max="20" step="0.1" value="11" />
<label for="weightInput">Weight</label>
<div class="weightRow">
<input type="number" id="weightInput" min="30" max="400" step="1" value="170" placeholder="Enter weight" inputmode="decimal" />
<select id="weightUnitSelect" aria-label="Weight unit">
<option value="lb" selected>lb</option>
<option value="kg">kg</option>
</select>
</div>
<div class="settingsRowToggles" style="margin-top:0.8em;display:flex;flex-direction:column;gap:0.4em;">
<label><input type="checkbox" id="autoNextCheckbox"> Auto-start next workout</label>
<label><input type="checkbox" id="enhancedHapticsCheckbox"> Enhanced haptics</label>
<label><input type="checkbox" id="hydrationReminderCheckbox"> Hydration reminders</label>
<label><input type="checkbox" id="batterySaverCheckbox"> Battery saver mode</label>
</div>
<div style="margin-top:1em;display:flex;flex-wrap:wrap;gap:0.5em;">
<button id="exportProgressBtn" type="button" class="secondaryBtn">Export Progress</button>
<button id="importProgressBtn" type="button" class="secondaryBtn">Import Progress</button>
<input type="file" id="importProgressFile" accept="application/json" hidden />
</div>
<button id="resetProgressBtn" type="button" class="secondaryBtn" style="margin-top:1.2em;">Reset Progress</button>
<button id="closeSettingsBtn" type="button">Close</button>
</div>
</div>
<footer>
<small>© 2025 Couch to 5K Trainer</small>
</footer>
<script src="app.js"></script>
</body>
</html>