-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
339 lines (274 loc) · 17 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Pomodoro Widget</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- GOOGLE PACKAGES -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" /> <!-- Symbols -->
<link href="style.css" rel="stylesheet">
<script src="timer.js"></script>
<script src="checklistProgress.js"></script>
<!-- FAVICON -->
<link rel="apple-touch-icon" sizes="180x180" href="favicon_io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon_io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon_io/favicon-16x16.png">
<!-- CONFETTI PACKAGE -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js"></script>
</head>
<body>
<!-- MAIN CONTENT -->
<div id="mainContent">
<!-- POMODORO TIMER CAROUSEL -->
<div id="carouselExampleControls" class="carousel slide" data-bs-ride="carousel" data-bs-interval="false">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="d-block w-100">
<h3>Pomodoro</h3>
<h1 id="1500">25:00</h1>
<div class="btn-group">
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="1500ppB" onclick="toggle_timer(1500)">
<span class="material-symbols-outlined" id="1500pp">play_arrow</span>
</button>
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="1500stop" onclick="reset_timer()" style="display: none">
<span class="material-symbols-outlined">stop</span>
</button>
</div>
</div>
</div>
<div class="carousel-item">
<div class="d-block w-100">
<h3>Short Break</h3>
<h1 id="300">05:00</h1>
<div class="btn-group">
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="300ppB" onclick="toggle_timer(300)">
<span class="material-symbols-outlined" id="300pp">play_arrow</span>
</button>
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="300stop" onclick="reset_timer()" style="display: none">
<span class="material-symbols-outlined">stop</span>
</button>
</div>
</div>
</div>
<div class="carousel-item">
<div class="d-block w-100">
<h3>Long Break</h3>
<h1 id="900">15:00</h1>
<div class="btn-group">
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="900ppB" onclick="toggle_timer(900)">
<span class="material-symbols-outlined" id="900pp">play_arrow</span>
</button>
<button type="button" class="btn btn-outline-light btn-sm rounded-0" id="900stop" onclick="reset_timer()" style="display: none">
<span class="material-symbols-outlined">stop</span>
</button>
</div>
</div>
</div>
</div>
<!-- Control Buttons -->
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="prev" onclick="reset_timer()">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleControls" data-bs-slide="next" onclick="reset_timer()">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<br><hr><br>
<!-- MISC OPTIONS -->
<div id="miscOptions">
<!-- Options Buttons -->
<div class="btn-group" role="group" aria-label="Basic example">
<button class="btn btn-outline-light" type="button" data-bs-toggle="offcanvas" data-bs-target="#taskList" aria-controls="offcanvasExample">
Tasks
</button>
<button type="button" class="btn btn-outline-light" data-bs-toggle="modal" data-bs-target="#spotifyOptions">
Spotify
</button>
</div>
<br><br>
<!-- Progress Bar -->
<div class="progress">
<div class="progress-bar progress-bar-striped bg-success" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" id="progressBar">
0%
</div>
</div>
</div>
<!-- CONFETTI ELEMENT -->
<button style="display: none" id="confetti" onclick="confetti({particleCount: 150, spread: 140, scalar: 1.3});"></button>
<audio id="alarmSound">
<source src="sounds/timer-alarm.mp3">
</audio>
</div>
<!-- Spotify Modal -->
<div class="modal fade" id="spotifyOptions" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content" style="background-color: #202124; color: white">
<div class="modal-header">
<h1 class="modal-title fs-5" id="staticBackdropLabel">Spotify</h1>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/25YbpOi19sVG0JKSDWt3Uo?utm_source=generator&theme=0" width="100%" height="380" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
</div>
</div>
</div>
</div>
<!-- OFFCANVAS CONTENT -->
<div class="offcanvas offcanvas-start" id="taskList" style="background-color: #202124; color: white">
<div class="offcanvas-header">
<h2 class="offcanvas-title" id="taskListHeader">Tasks:</h2>
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<!-- VISIBLE TASKS LIST -->
<ul id="visibleTasks" style="list-style: none; padding-left: 0%;">
<li id="noTasks" style="display: block">
<h5><i>There are no tasks.</i></h5>
</li>
<li id="finishTasks" style="display: none">
<h5><i>Congratulations, you finished all your tasks!</i></h5>
</li>
</ul>
<hr>
<!-- HIDDEN TASKS LIST -->
<ul id="hiddenTasks" style="display: none;">
<!-- ID Categories: -->
<!--
* task_ = <li> task number
* checkB_ = <input> checkbox, <label> checkbox
* checkV_ = <span> checkbox symbol value
* taskV_ = <input> task text
-->
<li id="task1">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB1" autocomplete="off" onclick="toggle_task_status('1')">
<label class="btn btn-outline-light" for="checkB1">
<span class="material-symbols-outlined" id="checkV1">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV1" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('1')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task2">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB2" autocomplete="off" onclick="toggle_task_status('2')">
<label class="btn btn-outline-light" for="checkB2">
<span class="material-symbols-outlined" id="checkV2">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV2" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('2')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task3">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB3" autocomplete="off" onclick="toggle_task_status('3')">
<label class="btn btn-outline-light" for="checkB3">
<span class="material-symbols-outlined" id="checkV3">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV3" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('3')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task4">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB4" autocomplete="off" onclick="toggle_task_status('4')">
<label class="btn btn-outline-light" for="checkB4">
<span class="material-symbols-outlined" id="checkV4">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV4" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('4')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task5">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB5" autocomplete="off" onclick="toggle_task_status('5')">
<label class="btn btn-outline-light" for="checkB5">
<span class="material-symbols-outlined" id="checkV5">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV5" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('5')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task6">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB6" autocomplete="off" onclick="toggle_task_status('6')">
<label class="btn btn-outline-light" for="checkB6">
<span class="material-symbols-outlined" id="checkV6">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV6" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('6')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task7">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB7" autocomplete="off" onclick="toggle_task_status('7')">
<label class="btn btn-outline-light" for="checkB7">
<span class="material-symbols-outlined" id="checkV7">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV7" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('7')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task8">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB8" autocomplete="off" onclick="toggle_task_status('8')">
<label class="btn btn-outline-light" for="checkB8">
<span class="material-symbols-outlined" id="checkV8">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV8" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('8')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task9">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB9" autocomplete="off" onclick="toggle_task_status('9')">
<label class="btn btn-outline-light" for="checkB9">
<span class="material-symbols-outlined" id="checkV9">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV9" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('9')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
<li id="task10">
<div class="input-group mb-3">
<input type="checkbox" class="btn-check" id="checkB10" autocomplete="off" onclick="toggle_task_status('10')">
<label class="btn btn-outline-light" for="checkB10">
<span class="material-symbols-outlined" id="checkV10">done</span>
</label><br>
<input type="text" class="form-control" placeholder="Enter task" id="taskV10" value="" style="background-color: transparent; border-color: transparent; color: white">
<button type="button" class="btn btn-outline-light" onclick="delete_task('10')" style="border-color: transparent">
<span class="material-symbols-outlined">close</span>
</button>
</div>
</li>
</ul>
<!-- ADD TASK BUTTON -->
<div style="display: flex; justify-content: center;">
<button class="btn btn-outline-light" id="addButton" onclick="add_task()">
<span class="material-symbols-outlined">add</span>
</button>
</div>
</div>
</div>
</body>
</html>