-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
456 lines (439 loc) · 17.9 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
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Period Calculator</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="description" content="With our free period calculator, you can find out more about your menstrual cycle and accurately predict when your next period will be.">
<link rel="preload" href="./assets/fonts/inter-v12-latin-regular.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-500.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-600.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-800.woff2" as="font" crossorigin type="font/woff2">
<script type="text/javascript">
window._ = document.getElementById.bind(document);
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
window.defaultSystem = "imperial";
localStorage.setItem("theme", "light");
</script>
<link rel="stylesheet" href="./assets/css/main.min.css" />
<script src="./assets/js/all-calculators.js" defer></script>
</head>
<body style="background-color: transparent !important; min-height: 0 !important">
<div style="width: 100%;">
<div style="width:350px;float:left;padding: 15px;">
<div class="calculator-settings">
<div class="calculator-setting" id="calculator_form">
<div class="calculator-content col">
<div class="input-wrapper row">
<label class="input col">
<p class="input__title">First Day of Your Last Period</p>
<div class="input-field row">
<input type="text" class="input-field__input datepicker_us imperial-system-item" placeholder="mm/dd/yyyy" data-inputmask="'mask': '99/99/9999', 'placeholder': 'mm/dd/yyyy'" data-target="first_day" id="first_day_us" onchange="updateDate(this)" value="10/04/2023" />
<input type="text" class="input-field__input datepicker metric-system-item system-item-hidden" placeholder="yyyy-mm-dd" data-inputmask="'mask': '9999-99-99', 'placeholder': 'yyyy-mm-dd'" data-target="first_day" id="first_day" onchange="updateDate(this)" value="2023–10-04" />
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.25 3.125H3.75C3.40482 3.125 3.125 3.40482 3.125 3.75V16.25C3.125 16.5952 3.40482 16.875 3.75 16.875H16.25C16.5952 16.875 16.875 16.5952 16.875 16.25V3.75C16.875 3.40482 16.5952 3.125 16.25 3.125Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M13.75 1.5625V3.125" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M6.25 1.5625V3.125" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M3.125 6.875H16.875" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</div>
</label>
</div>
<div class="input-wrapper row">
<label class="input col pregnancy-calculator,period-calculator,ovulation-calculator,due-date-calculator">
<p class="input__title">Last Period Length</p>
<div class="dropdown-wrapper">
<div class="input-field row " tabindex="0">
<select class="input-field__text" onchange="toggleRelatedInputs(this)" id="last_period_length">
<option value="1 day" >
1 day
</option>
<option value="2 days" >
2 days
</option>
<option value="3 days" >
3 days
</option>
<option value="4 days" >
4 days
</option>
<option value="5 days" selected>
5 days
</option>
<option value="6 days" >
6 days
</option>
<option value="7 days" >
7 days
</option>
<option value="8 days" >
8 days
</option>
<option value="9 days" >
9 days
</option>
<option value="10 days" >
10 days
</option>
</select>
</div>
</div>
</label> <label class="input col pregnancy-calculator,period-calculator,ovulation-calculator,due-date-calculator">
<p class="input__title">Avg. Cycles Length</p>
<div class="dropdown-wrapper">
<div class="input-field row " tabindex="0">
<select class="input-field__text" onchange="toggleRelatedInputs(this)" id="avg_cycles_length">
<option value="22 days" >
22 days
</option>
<option value="23 days" >
23 days
</option>
<option value="24 days" >
24 days
</option>
<option value="25 days" >
25 days
</option>
<option value="26 days" >
26 days
</option>
<option value="27 days" >
27 days
</option>
<option value="28 days" selected>
28 days
</option>
<option value="29 days" >
29 days
</option>
<option value="30 days" >
30 days
</option>
<option value="31 days" >
31 days
</option>
<option value="32 days" >
32 days
</option>
<option value="33 days" >
33 days
</option>
<option value="34 days" >
34 days
</option>
<option value="35 days" >
35 days
</option>
<option value="36 days" >
36 days
</option>
<option value="37 days" >
37 days
</option>
<option value="38 days" >
38 days
</option>
<option value="39 days" >
39 days
</option>
<option value="40 days" >
40 days
</option>
<option value="41 days" >
41 days
</option>
<option value="42 days" >
42 days
</option>
<option value="43 days" >
43 days
</option>
<option value="44 days" >
44 days
</option>
</select>
</div>
</div>
</label> </div>
</div>
<div class="calculator-content calculator-content--gray calculator-content--footer calculator-content--small row " >
<button class="system-switcher" onclick="toggleSystem(this)" aria-label="Switch System">
<div class="system-switcher__circle"></div>
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.5 9.5H10C9.44772 9.5 9 9.05228 9 8.5V2.5M4.5 2.5H3.5C2.94772 2.5 2.5 2.94772 2.5 3.5L2.5 9.5M7.5 4.5L10.5 4.5M1.5 5.5L4.5 5.5" stroke="white" stroke-width="2" stroke-linecap="round"></path>
</svg>
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 3.5L2 8.5M2 8L2 5.5C2 4.39543 2.89543 3.5 4 3.5C5.10457 3.5 6 4.39543 6 5.5M6 5.5L6 8.5M6 5.5L6 8M6 5.5C6 4.39543 6.89543 3.5 8 3.5C9.10457 3.5 10 4.39543 10 5.5V8.5" stroke="white" stroke-width="2" stroke-linecap="round"></path>
</svg>
</button>
<script type="text/javascript">
$$(".imperial-system-item, .metric-system-item").forEach(function(element, index){
element.classList.remove("system-item-hidden");
});
$$((defaultSystem == "metric") ? ".imperial-system-item" : ".metric-system-item").forEach(function(element, index){
element.classList.add("system-item-hidden");
});
if(defaultSystem == "metric") $('.system-switcher').classList.add('system-switcher--active');
</script>
<button class="button button--primary ml-auto" onclick="calculate(this); animateElements();" data-action="calculate" id="action-button">Calculate</button>
</div>
<link rel="stylesheet" href="./assets/css/air-datepicker.min.css" defer />
<script type="text/javascript" src="./assets/js/lib/air-datepicker.js" id="datepicker_script" defer></script>
<script type="text/javascript" src="./assets/js/calculator.js" defer></script>
</div>
</div>
</div>
<div style="float:left;padding: 15px; overflow: scroll;">
<div class="calculator-result calculator-result--error col" id="error-box">
<div class="row">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711
7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289
12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071
11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z" fill="#F87171" class="dark:fill-red-200"></path>
</svg>
<p class="calculator-error__title">There was an error with your calculation.</p>
</div>
<div class="col" id="error-list"></div>
</div> <span id="calculator_result"><div class="calculator-result col">
<p class="table-cell table-cell--dark table-cell--only-title">Result</p>
<div class="table-cell table-cell--age table-cell--only row">
<div class="row table-cell--date-count">
<div class="col result-age result-age--big result-age--from result-1">
<p class="date-title date-title--small date-title--date animate"><b>Oct 2023</b></p>
<div>
<p>M</p>
<p>T</p>
<p>W</p>
<p>T</p>
<p>F</p>
<p>S</p>
<p>S</p>
</div>
<div class="result-age--days">
<p></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class="">1</p>
<p>2</p>
<p>3</p>
<p class="pink-cell">4</p>
<p class="pink-cell">5</p>
<p class="pink-cell">6</p>
<p class="pink-cell">7</p>
<p class="pink-cell">8</p>
<p class="">9</p>
<p class="">10</p>
<p class="">11</p>
<p class="">12</p>
<p class="">13</p>
<p class="">14</p>
<p class="">15</p>
<p class="green-cell">16</p>
<p class="green-cell">17</p>
<p class="green-cell">18</p>
<p class="green-cell">19</p>
<p class="green-cell">20</p>
<p>21</p>
<p>22</p>
<p>23</p>
<p>24</p>
<p>25</p>
<p class="">26</p>
<p class="">27</p>
<p class="">28</p>
<p class="">29</p>
<p class="">30</p>
<p class="">31</p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
</div>
</div>
<div class="col result-age result-age--big result-age--from result-2">
<p class="date-title date-title--small date-title--date animate"><b>Nov 2023</b></p>
<div>
<p>M</p>
<p>T</p>
<p>W</p>
<p>T</p>
<p>F</p>
<p>S</p>
<p>S</p>
</div>
<div class="result-age--days">
<p></p>
<p class=""></p>
<p class="pink-cell">1</p>
<p class="pink-cell">2</p>
<p class="pink-cell">3</p>
<p class="pink-cell">4</p>
<p class="pink-cell">5</p>
<p class="">6</p>
<p class="">7</p>
<p>8</p>
<p>9</p>
<p>10</p>
<p>11</p>
<p>12</p>
<p class="green-cell">13</p>
<p class="green-cell">14</p>
<p class="green-cell">15</p>
<p class="green-cell">16</p>
<p class="green-cell">17</p>
<p class="">18</p>
<p class="">19</p>
<p>20</p>
<p>21</p>
<p>22</p>
<p>23</p>
<p>24</p>
<p>25</p>
<p>26</p>
<p>27</p>
<p>28</p>
<p class="pink-cell">29</p>
<p class="pink-cell">30</p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
</div>
</div>
<div class="col result-age result-age--big result-age--from result-3">
<p class="date-title date-title--small date-title--date animate"><b>Dec 2023</b></p>
<div>
<p>M</p>
<p>T</p>
<p>W</p>
<p>T</p>
<p>F</p>
<p>S</p>
<p>S</p>
</div>
<div class="result-age--days">
<p></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class="pink-cell">1</p>
<p class="pink-cell">2</p>
<p class="pink-cell">3</p>
<p class="">4</p>
<p class="">5</p>
<p>6</p>
<p>7</p>
<p>8</p>
<p>9</p>
<p>10</p>
<p class="green-cell">11</p>
<p class="green-cell">12</p>
<p class="green-cell">13</p>
<p class="green-cell">14</p>
<p class="green-cell">15</p>
<p class="">16</p>
<p class="">17</p>
<p>18</p>
<p>19</p>
<p>20</p>
<p>21</p>
<p>22</p>
<p>23</p>
<p>24</p>
<p>25</p>
<p>26</p>
<p class="pink-cell">27</p>
<p class="pink-cell">28</p>
<p class="pink-cell">29</p>
<p class="pink-cell">30</p>
<p class="pink-cell">31</p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
<p class=""></p>
</div>
</div>
</div>
<div class="row table-cell--controls">
<div class="result-legend-items row">
<div class="result-legend-item">
<div class="result-legend-item__color result-legend-item__color--pink"></div>
<p class="result-legend-item__title">Period Days</p>
</div>
<div class="result-legend-item">
<div class="result-legend-item__color result-legend-item__color--green"></div>
<p class="result-legend-item__title">Most Probable Ovulation Days</p>
</div>
</div>
<div class="result-controls row">
<button class="result-controls__button result-controls__button--prev" onclick="changeCalendar('prev')">← Previous 3 months</button>
<button class="result-controls__button result-controls__button--next" onclick="changeCalendar('next')">Next 3 months →</button>
</div>
</div>
</div>
<div class="result-table__wrapper">
<table class="result-table">
<thead>
<tr>
<th class="dark indigo" colspan="3">Important dates for the next 6 cycles</th>
</tr>
</thead>
<tbody>
<tr>
<th class="text-center"></th>
<th class="short">Period</th>
<th class="short">Ovulation Window</th>
</tr>
</tbody>
<tbody id="next-6-cycles" class="animate"><tr>
<td class="text-center">1</td>
<td class="short">Oct 4 - Oct 9</td>
<td class="short">Oct 16 - Oct 20</td>
</tr><tr>
<td class="text-center">2</td>
<td class="short">Nov 1 - Nov 6</td>
<td class="short">Nov 13 - Nov 17</td>
</tr><tr>
<td class="text-center">3</td>
<td class="short">Nov 29 - Dec 4</td>
<td class="short">Dec 11 - Dec 15</td>
</tr><tr>
<td class="text-center">4</td>
<td class="short">Dec 27 - Jan 1</td>
<td class="short">Jan 8 - Jan 12</td>
</tr><tr>
<td class="text-center">5</td>
<td class="short">Jan 24 - Jan 29</td>
<td class="short">Feb 5 - Feb 9</td>
</tr><tr>
<td class="text-center">6</td>
<td class="short">Feb 21 - Feb 26</td>
<td class="short">Marc 4 - Marc 8</td>
</tr></tbody>
</table>
</div>
</div>
</span>
</div>
</div>
<script async src="./assets/js/lib/math.min.js"></script>
<script defer src="./assets/js/functions.js"></script>
</body>
</html>