-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
213 lines (199 loc) · 10.5 KB
/
index.html
File metadata and controls
213 lines (199 loc) · 10.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3PSNCFVT76"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3PSNCFVT76');
</script>
<script>
// GitHub Pages SPA redirect handler
(function() {
var redirect = sessionStorage.getItem('gh-spa-redirect');
if (redirect) {
sessionStorage.removeItem('gh-spa-redirect');
history.replaceState(null, null, redirect);
}
})();
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A clean, minimal Pomodoro timer for focused work sessions">
<meta name="theme-color" content="#111213">
<title>Time & Flow</title>
<!-- Favicon - Elegant Clock SVG -->
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='%23111213' stroke='%23fff' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='3' fill='%23fff'/%3E%3Cline x1='50' y1='50' x2='50' y2='20' stroke='%23fff' stroke-width='4' stroke-linecap='round'/%3E%3Cline x1='50' y1='50' x2='70' y2='50' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E">
<link rel="apple-touch-icon" href="icon-192.png">
<!-- PWA Manifest -->
<link rel="manifest" href="manifest.json">
<!-- Styles -->
<link rel="stylesheet" href="styles.css">
</head>
<body data-theme="dark">
<div id="app">
<!-- Header with badge and clock -->
<div id="header">
<div id="badge">Deep Work</div>
<div id="clock-row">
<div id="clock">00:00</div>
<button id="settings-btn" aria-label="Settings">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="3"/>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
</svg>
</button>
</div>
</div>
<!-- Main Content -->
<div id="content">
<!-- Timer Section -->
<div id="timer-section">
<div id="ring">
<svg viewBox="0 0 280 280">
<circle cx="140" cy="140" r="120" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="4"/>
<circle id="progress" cx="140" cy="140" r="120" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-dasharray="754" stroke-dashoffset="754"/>
</svg>
<div id="timer-text">
<div id="timer-time">25:00</div>
<div id="timer-status">Paused</div>
</div>
</div>
</div>
<!-- Controls Section -->
<div id="controls-section">
<div id="controls">
<button class="ctrl small" id="reset-btn" aria-label="Reset">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
<path d="M3 3v5h5"/>
</svg>
</button>
<button class="ctrl large" id="play-btn" aria-label="Play/Pause">
<svg id="icon-play" width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
<polygon points="5,3 19,12 5,21"/>
</svg>
<svg id="icon-pause" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" style="display:none">
<rect x="6" y="4" width="4" height="16"/>
<rect x="14" y="4" width="4" height="16"/>
</svg>
</button>
<button class="ctrl small" id="mode-btn" aria-label="Switch Mode">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3v18"/>
<path d="m9 18 3 3 3-3"/>
<path d="m9 6 3-3 3 3"/>
</svg>
</button>
</div>
</div>
</div>
</div>
<!-- Settings Modal -->
<div id="settings-modal">
<div id="settings-content">
<div id="settings-header">
<div id="settings-title">Settings</div>
<button id="settings-close" aria-label="Close settings">×</button>
</div>
<!-- Timer Durations -->
<div class="settings-section">
<div class="settings-section-title">Timer Durations</div>
<div class="settings-row">
<span class="settings-label">Work (minutes)</span>
<input type="number" id="work-minutes" class="settings-input" value="25" min="1" max="120">
</div>
<div class="settings-row">
<span class="settings-label">Short Break (minutes)</span>
<input type="number" id="short-break-minutes" class="settings-input" value="5" min="1" max="60">
</div>
<div class="settings-row">
<span class="settings-label">Long Break (minutes)</span>
<input type="number" id="long-break-minutes" class="settings-input" value="15" min="1" max="120">
</div>
</div>
<!-- Preferences -->
<div class="settings-section">
<div class="settings-section-title">Preferences</div>
<div class="settings-row">
<span class="settings-label">Sound</span>
<label class="settings-toggle" id="sound-toggle">
<div class="toggle-switch active">
<div class="toggle-knob"></div>
</div>
</label>
</div>
<div class="settings-row">
<span class="settings-label">Auto-start Break</span>
<label class="settings-toggle" id="auto-start-break-toggle">
<div class="toggle-switch">
<div class="toggle-knob"></div>
</div>
</label>
</div>
<div class="settings-row">
<span class="settings-label">Theme: <span id="theme-label">Dark</span></span>
<label class="settings-toggle" id="theme-toggle">
<div class="toggle-switch active">
<div class="toggle-knob"></div>
</div>
</label>
</div>
</div>
<!-- Stats Section -->
<div class="settings-section" id="stats-section">
<div class="settings-section-title">Today's Stats</div>
<div class="stats-row">
<div class="stat-item">
<span class="stat-value" id="today-sessions">0</span>
<span class="stat-label">Sessions</span>
</div>
<div class="stat-item">
<span class="stat-value" id="today-focus-time">0m</span>
<span class="stat-label">Focus Time</span>
</div>
</div>
</div>
<!-- Keyboard Shortcuts (desktop only) -->
<div class="settings-section" id="shortcuts-section">
<div class="settings-section-title">Keyboard Shortcuts</div>
<div class="settings-shortcut-row">
<span class="settings-shortcut-key">Space</span>
<span class="settings-shortcut-desc">Play / Pause timer</span>
</div>
<div class="settings-shortcut-row">
<span class="settings-shortcut-key">R</span>
<span class="settings-shortcut-desc">Reset timer (when running)<br>Switch mode (when paused)</span>
</div>
<div class="settings-shortcut-row">
<span class="settings-shortcut-key">F</span>
<span class="settings-shortcut-desc">Toggle fullscreen</span>
</div>
<div class="settings-shortcut-row">
<span class="settings-shortcut-key">?</span>
<span class="settings-shortcut-desc">Open settings</span>
</div>
</div>
<!-- Data -->
<div class="settings-section">
<div class="settings-section-title">Data</div>
<button id="settings-reset" class="settings-reset-btn">Reset All Settings</button>
</div>
<!-- Credits -->
<div class="settings-section">
<div class="settings-credits">
<strong>Time & Flow</strong><br>
A Pomodoro timer by QQ<br>
With help from Nova ☄️<br><br>
Built with ❤️ using vanilla JS<br>
<a href="https://github.com/QQSHI13/flow" target="_blank" rel="noopener">View on GitHub</a>
</div>
</div>
</div>
</div>
<!-- Application Logic (includes service worker registration) -->
<script src="app.js"></script>
</body>
</html>