-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (107 loc) · 3.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./assets/images/favicon-32x32.png"
/>
<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=Poppins:ital,wght@0,700;1,400;1,800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="./css/style.css" />
<title>Age calculator app</title>
</head>
<body>
<main>
<div class="calculator">
<form action="" class="js-form calculator__form">
<ul>
<li>
<label for="day" class="js-title">day</label>
<input
type="text"
maxlength="2"
name="day"
id="day"
class="js-input-day input"
autofocus
onkeyup="if (this.value.length == this.getAttribute('maxlength')) month.focus()"
/>
<p class="js-warning-day warning"></p>
</li>
<li>
<label for="month" class="js-title">month</label>
<input
type="text"
maxlength="2"
name="month"
id="month"
class="js-input-month input"
onkeyup="if (this.value.length == this.getAttribute('maxlength')) year.focus()"
/>
<p class="js-warning-month warning"></p>
</li>
<li>
<label for="year" class="js-title">year</label>
<input
type="text"
maxlength="4"
name="year"
id="year"
class="js-input-year input"
onkeyup="if (this.value.length == this.getAttribute('maxlength')) button.focus()"
/>
<p class="js-warning-year warning"></p>
</li>
</ul>
<button class="js-btn-calculate" title="calculate" id="button">
<svg
xmlns="http://www.w3.org/2000/svg"
width="46"
height="44"
viewBox="0 0 46 44"
>
<g fill="none" stroke="#FFF" stroke-width="2">
<path
d="M1 22.019C8.333 21.686 23 25.616 23 44M23 44V0M45 22.019C37.667 21.686 23 25.616 23 44"
/>
</g>
</svg>
</button>
</form>
<div class="calculator__result">
<p>
<span class="js-display-year">-- </span>
years
</p>
<p>
<span class="js-display-month">-- </span>
months
</p>
<p>
<span class="js-display-day">-- </span>
days
</p>
</div>
</div>
</main>
<footer>
<p>
Challenge by
<a href="https://www.frontendmentor.io?ref=challenge" target="_blank"
>Frontend Mentor</a
>. Coded by
<a href="https://github.com/lupeMorales" target="_blank">lupeMorales</a
>.
</p>
</footer>
<script src="./main.js"></script>
</body>
</html>