Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
362 lines (336 loc) · 19.6 KB
/
Copy pathindex.html
File metadata and controls
362 lines (336 loc) · 19.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#0a0e0b">
<meta name="description" content="OnTrack — understand what matters, see what's getting in the way, and actually do something about it.">
<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="black-translucent">
<meta name="apple-mobile-web-app-title" content="OnTrack">
<title>OnTrack</title>
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icons/icon-192.png">
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Branded startup splash (PWA / first paint). app.js / CSS transitions
this out once the real UI is ready; see #app-init-hide in styles.css. -->
<div id="app-splash">
<div class="splash-inner">
<div class="splash-mark">OT</div>
<div class="splash-title">ONTRACK</div>
<div class="splash-tagline">Build the life you're working toward.</div>
</div>
</div>
<!-- Marketing landing page. Shown on boot only when there is no signed-in
session; every CTA hands off to the existing access/sign-in screen. -->
<div id="landing-screen" class="hidden">
<header class="lp-nav">
<div class="lp-wrap lp-nav-inner">
<a class="lp-logo" href="#lp-home"><svg class="lp-logo-mark" viewBox="0 0 28 28" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="square" aria-hidden="true"><path d="M5 23 21 7M10 5h13v13"/></svg><span>OnTrack</span></a>
<nav class="lp-links" aria-label="Primary">
<a href="#lp-home" class="active">Home</a><a href="#lp-features">Features</a><a href="#lp-about">About</a><a href="#lp-faq">FAQ</a>
</nav>
<div class="lp-nav-cta">
<button type="button" class="lp-signin" data-lp-enter>Sign In</button>
<button type="button" class="lp-btn lp-btn-primary lp-btn-sm" data-lp-enter>Get Started <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
</div>
</div>
</header>
<section class="lp-hero" id="lp-home">
<div class="lp-hero-art" role="img" aria-label="A runner climbing concrete stairs toward a glowing horizon"></div>
<div class="lp-wrap lp-hero-copy">
<p class="lp-eyebrow">Your growth. Your system.</p>
<h1>Build a life that <em>moves forward.</em></h1>
<p class="lp-lede">OnTrack is your personal productivity and growth companion. Plan your day, build better habits, track your progress, and become the best version of yourself.</p>
<div class="lp-actions">
<button type="button" class="lp-btn lp-btn-primary" data-lp-enter>Get Started <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
<a class="lp-btn lp-btn-ghost" href="#lp-features">Learn More</a>
</div>
</div>
</section>
<section class="lp-features" id="lp-features">
<div class="lp-wrap">
<div class="lp-feat-head">
<div><p class="lp-eyebrow">Everything you need</p><h2>Simple tools.<br><em>Lasting change.</em></h2></div>
<p>OnTrack brings your goals, habits, and progress together in one place. No more scattered apps, no more lost motivation. Just a clear path forward.</p>
</div>
<ul class="lp-grid">
<li><svg viewBox="0 0 40 40" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><circle cx="19" cy="21" r="14"/><circle cx="19" cy="21" r="8"/><circle cx="19" cy="21" r="2.5"/><path d="M19 21 33 7M27 6l6 1 1 6"/></svg><h3>Plan Your Day</h3><p>Turn your goals into actionable tasks and stay focused on what really matters.</p></li>
<li><svg viewBox="0 0 40 40" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 34c0-8 4-14 12-16"/><path d="M20 18c-7-1-11-5-11-11 8 0 12 4 11 11Z"/><path d="M20 26c0-7 4-11 11-11 0 7-4 11-11 11Z"/></svg><h3>Build Better Habits</h3><p>Small, consistent actions create big results. Track your habits and stay on course.</p></li>
<li><svg viewBox="0 0 40 40" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" aria-hidden="true"><rect x="5" y="26" width="6" height="9" rx="2"/><rect x="17" y="16" width="6" height="19" rx="2"/><rect x="29" y="5" width="6" height="30" rx="2"/></svg><h3>Track Your Progress</h3><p>See how far you've come, spot patterns, and make smarter decisions.</p></li>
<li><svg viewBox="0 0 40 40" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 7c-3-3-9-2-10 3-4 1-5 6-2 9-2 4 1 9 5 9 2 3 6 3 7 0 1 3 5 3 7 0 4 0 7-5 5-9 3-3 2-8-2-9-1-5-7-6-10-3Z"/><path d="M20 7v26M13 16c3 0 5 2 7 4M27 16c-3 0-5 2-7 4M13 26c3 0 5-2 7-3M27 26c-3 0-5-2-7-3"/></svg><h3>Grow Continuously</h3><p>Learn, improve, and unlock your full potential — one step at a time.</p></li>
</ul>
</div>
</section>
<section class="lp-mindset" id="lp-about">
<div class="lp-mindset-art" role="img" aria-label="A winding glowing path leading up a dark mountain"></div>
<div class="lp-wrap">
<div class="lp-mindset-copy">
<p class="lp-eyebrow">The OnTrack mindset</p>
<h2>Progress isn't about <em>perfection.</em></h2>
<p>It's about consistency. OnTrack helps you stay focused, build momentum, and keep showing up for the life you want — every day.</p>
<button type="button" class="lp-textlink" data-lp-enter>Learn More <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button>
</div>
</div>
</section>
<section class="lp-faq" id="lp-faq">
<div class="lp-wrap">
<h2>Questions</h2>
<details><summary>Is OnTrack free to start?</summary><p>Yes. Create a profile and you get an access code you can use to sign back in.</p></details>
<details><summary>Will it work on my phone?</summary><p>OnTrack is installable on phones and works offline after your first visit.</p></details>
<details><summary>Where is my data kept?</summary><p>On your device, and synced to your connected account when cloud sync is set up.</p></details>
<div class="lp-actions"><button type="button" class="lp-btn lp-btn-primary" data-lp-enter>Get Started <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></button></div>
</div>
</section>
</div>
<!-- Access / Sign in -->
<div id="access-screen" class="auth-overlay">
<button type="button" id="access-back-home" class="access-back-home">Back to home</button>
<div class="auth-card" id="access-card">
<!-- rendered by app.js -->
</div>
</div>
<!-- Onboarding Wizard -->
<div id="onboarding-screen" class="hidden">
<div class="onboarding-card" id="onboarding-card">
<!-- step content rendered by app.js -->
</div>
</div>
<!-- Main App View -->
<div id="app-screen" class="hidden">
<header>
<div class="header-left">
<span class="brand-title">OnTrack</span>
<nav class="nav-tabs">
<button class="nav-btn active" data-tab="today">Today</button>
<button class="nav-btn" data-tab="habits">Habits</button>
<button class="nav-btn" data-tab="progress">Progress</button>
<button class="nav-btn" data-tab="profile">Profile</button>
</nav>
</div>
<div class="user-badge">
<button id="header-avatar-btn" type="button" class="avatar-btn" title="Profile">
<span id="header-avatar" class="avatar avatar-sm"></span>
</button>
<span id="active-user-name">User</span>
<button id="lock-btn" type="button" class="lock-btn">Switch</button>
</div>
</header>
<!-- Mobile bottom nav — labelled icons, not abstract glyphs -->
<nav class="mobile-nav">
<button class="mnav-btn active" data-tab="today">
<svg class="mnav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M12 7v5l3 3"></path></svg>
<span>Today</span>
</button>
<button class="mnav-btn" data-tab="habits">
<svg class="mnav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="17" rx="2"></rect><path d="M3 9h18M8 2v4M16 2v4"></path><path d="M8 14l2.5 2.5L16 11"></path></svg>
<span>Habits</span>
</button>
<button class="mnav-btn" data-tab="progress">
<svg class="mnav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19V10M11 19V5M18 19v-7"></path><path d="M3 19h18"></path></svg>
<span>Progress</span>
</button>
<button class="mnav-btn" data-tab="profile">
<svg class="mnav-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"></circle><path d="M4 20c0-4 3.6-6.5 8-6.5s8 2.5 8 6.5"></path></svg>
<span>Profile</span>
</button>
</nav>
<main>
<!-- Today Tab -->
<section id="tab-today">
<div id="today-container"></div>
</section>
<!-- Habits Tab (matrix + Skills sub-view) -->
<section id="tab-habits" class="hidden">
<div class="habits-subtabs">
<button type="button" class="habits-subtab-btn active" data-sub="grid">Habits</button>
<button type="button" class="habits-subtab-btn" data-sub="skills">Skills I'm Building</button>
</div>
<div id="habits-grid-section">
<div class="panel">
<div class="panel-title">Habit grid</div>
<div class="month-nav">
<button id="prev-month-btn" type="button" class="btn-secondary month-nav-btn" aria-label="Previous month">‹</button>
<span id="month-label" class="month-label">Month Year</span>
<button id="next-month-btn" type="button" class="btn-secondary month-nav-btn" aria-label="Next month">›</button>
<button id="today-btn" type="button" class="btn-secondary today-btn">Today</button>
</div>
<div class="grid-wrapper">
<table class="habit-table">
<thead>
<tr id="grid-header"></tr>
</thead>
<tbody id="grid-body"></tbody>
</table>
</div>
<div class="inline-form">
<input type="text" id="new-habit-input" class="inline-input" placeholder="Habit name">
<button id="add-habit-btn" type="button" class="btn-secondary">Add</button>
</div>
<p class="hint-text">Tap a cell to cycle: empty → done → adjusted → missed → empty. <strong>Adjusted</strong> = completed a smaller or modified version of the plan. Click a habit name for details.</p>
</div>
</div>
<div id="habits-skills-section" class="hidden">
<div class="panel">
<div class="panel-title">Skills I'm Building</div>
<p class="hint-text mb-8">A habit is something you repeat. A skill is something you're actively trying to get better at — practice it, log evidence, watch it grow.</p>
<div id="skills-container" class="skills-grid"></div>
<div class="inline-form skill-form-margin">
<input type="text" id="new-skill-input" class="inline-input" placeholder="Skill name">
<button id="add-skill-btn" type="button" class="btn-secondary">Add skill</button>
</div>
</div>
</div>
</section>
<!-- Progress Tab (overview + friction + weekly review) -->
<section id="tab-progress" class="hidden">
<div class="panel">
<div class="panel-title">How far you've come</div>
<div id="progress-summary" class="progress-summary"></div>
</div>
<div id="progress-narrative"></div>
<div class="panel">
<div class="panel-title">Consistency by month</div>
<div id="progress-chart" class="progress-chart"></div>
</div>
<div class="panel">
<div class="panel-title">Per-habit breakdown</div>
<div id="progress-habits" class="progress-habits"></div>
</div>
<div class="panel">
<div class="panel-title">Friction — what's repeatedly getting in the way</div>
<div id="friction-analytics"></div>
</div>
<div class="panel">
<div class="panel-title">Recent misses</div>
<div id="friction-log-list" class="friction-list"></div>
</div>
<div class="panel">
<div class="panel-title">Weekly review</div>
<div id="weekly-review-inline"></div>
</div>
</section>
<!-- Profile Tab -->
<section id="tab-profile" class="hidden">
<div class="panel">
<div class="panel-title">Profile</div>
<div class="settings-form">
<div class="avatar-row">
<span id="profile-avatar" class="avatar avatar-lg"></span>
<div class="avatar-controls">
<div class="flex-gap-8">
<button id="avatar-upload-btn" type="button" class="btn-secondary">Upload photo</button>
<button id="avatar-remove-btn" type="button" class="btn-secondary btn-danger">Remove</button>
</div>
<input type="file" id="avatar-file" class="hidden" accept="image/*">
<p class="hint-text" id="profile-stats"></p>
</div>
</div>
<div>
<label class="input-label" for="display-name-input">Display name</label>
<input type="text" id="display-name-input" class="inline-input full-width">
</div>
<p class="hint-text" id="profile-identity-note"></p>
<button type="button" id="restart-onboarding-btn" class="btn-secondary">Restart onboarding</button>
</div>
</div>
<div class="panel">
<div class="panel-title">Access code & account</div>
<div class="settings-form">
<p class="input-label">Your access code</p>
<span id="profile-access-code" class="settings-access-code"></span>
<p class="hint-text mt-8">Use this to get back into your account, including from another device.</p>
<p id="profile-cloud-status" class="cloud-status-line mt-10"></p>
</div>
</div>
<div class="panel">
<div class="panel-title">Appearance</div>
<div class="settings-form">
<div class="segmented" id="appearance-segmented">
<button type="button" class="segmented-btn" data-value="system">System</button>
<button type="button" class="segmented-btn" data-value="dark">Dark</button>
<button type="button" class="segmented-btn" data-value="light">Light</button>
</div>
</div>
</div>
<div class="panel">
<div class="panel-title">Notifications</div>
<p class="hint-text mb-8">You control exactly what OnTrack surfaces. Real push delivery needs the PWA/service-worker permission flow below — these preferences are honored the moment that's granted.</p>
<div class="settings-form">
<label class="toggle-row"><input type="checkbox" id="notif-habit-reminders"> Habit reminders</label>
<label class="toggle-row"><input type="checkbox" id="notif-challenge-reminders"> Today's challenge reminders</label>
<label class="toggle-row"><input type="checkbox" id="notif-weekly-review"> Weekly review</label>
<label class="toggle-row"><input type="checkbox" id="notif-daily-checkin"> Daily check-in</label>
</div>
</div>
<div class="panel">
<div class="panel-title">Privacy</div>
<div class="settings-form">
<p class="hint-text" id="privacy-data-note"></p>
</div>
</div>
<div class="panel">
<div class="panel-title">Data</div>
<div class="settings-form">
<div>
<p class="input-label mb-8">Backup</p>
<div class="flex-gap-8">
<button id="export-btn" type="button" class="btn-secondary">Export JSON</button>
<button id="import-btn" type="button" class="btn-secondary">Import JSON</button>
<input type="file" id="import-file" class="hidden" accept=".json">
</div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-title">Danger zone</div>
<div class="settings-form">
<button id="reset-profile-btn" type="button" class="btn-secondary btn-danger">Clear my data & restart onboarding</button>
<button id="clear-local-btn" type="button" class="btn-secondary btn-danger">Erase all local OnTrack data</button>
<p class="hint-text">These only affect this browser. A connected account is untouched.</p>
</div>
</div>
</section>
</main>
</div>
<!-- Friction Modal -->
<div id="failure-modal" class="modal-overlay hidden">
<div class="modal">
<div class="panel-title modal-title-margin">What happened?</div>
<p class="modal-subtitle">Why was this habit missed?</p>
<div class="modal-buttons" id="failure-reason-buttons"></div>
<div class="mt-14">
<input type="text" id="failure-note-input" class="inline-input full-width" placeholder="Optional note">
<button type="button" class="btn-primary mt-10" id="failure-note-submit">Save</button>
</div>
</div>
</div>
<!-- Habit Detail Modal -->
<div id="habit-detail-modal" class="modal-overlay hidden">
<div class="modal habit-detail-modal">
<div id="habit-detail-body"></div>
<button type="button" class="btn-secondary full-width mt-14" id="habit-detail-close">Close</button>
</div>
</div>
<!-- Weekly Review Modal -->
<div id="weekly-review-modal" class="modal-overlay hidden">
<div class="modal habit-detail-modal">
<div id="weekly-review-body"></div>
<button type="button" class="btn-secondary full-width mt-14" id="weekly-review-close">Close</button>
</div>
</div>
<!-- Supabase client (only used once supabase-config.js has real
credentials — see SETUP.md). Loading this script never makes a
network call by itself. -->
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2/dist/umd/supabase.js"></script>
<script src="supabase-config.js"></script>
<script src="app.js"></script>
</body>
</html>