-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
181 lines (169 loc) · 4.58 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
<!-- @format -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- link preview -->
<meta property="og:title" content="NerdyNerd | Tip calculator app" />
<meta
property="og:description"
content="A tip calculator app with advanced UI/UX features" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://i.imgur.com/AIDK2eo.png" />
<meta
property="og:url"
content="https://advanced-tip-calculator-app-nerdynerd.netlify.app/" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./images/favicon-32x32.png" />
<title>Frontend Mentor | Tip calculator app</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="site-header">
<img
src="./images/logo.svg"
alt="site logo image"
class="site-logo" />
</header>
<main>
<div class="main-section-container">
<!-- tip input section -->
<div class="input-section">
<form novalidate id="tip-input-control-form">
<div class="form-inner-container">
<!-- bill amount -->
<div class="input-container">
<h1>Bill</h1>
<label
for="bill-amount-input"
class="input-inner-container bill-amount-input-container">
<input
type="number"
required
id="bill-amount-input"
class="number-input"
min="1" />
<!-- error message -->
<span class="error-message"
>Can't be zero</span
>
</label>
</div>
<!-- tip percentage select -->
<fieldset class="percent-buttons-container">
<span>Select Tip %</span>
<div class="percent-buttons-inner-container">
<button
type="button"
class="transitioned-state">
<span>5%</span> </button
><button
type="button"
class="transitioned-state">
<span>10%</span> </button
><button
type="button"
class="transitioned-state">
<span>15%</span> </button
><button
type="button"
class="transitioned-state">
<span>25%</span> </button
><button
type="button"
class="transitioned-state">
<span>50%</span>
</button>
<div
class="input-inner-container custom-percent-input-container">
<input
type="number"
id="custom-percent-input"
class="number-input"
placeholder="Custom"
min="1" />
<!-- error message -->
<span class="error-message"
>Can't be zero</span
>
</div>
</div>
</fieldset>
<!-- number of people to tip -->
<div class="input-container">
<label for="number-of-people-input"
>Number of People</label
>
<div
class="input-inner-container number-of-people-input-container">
<input
type="number"
required
id="number-of-people-input"
class="number-input"
min="1" />
<!-- error message -->
<span class="error-message"
>Can't be zero</span
>
</div>
</div>
</div>
</form>
</div>
<!-- result feedback section -->
<div class="result-feedback-section">
<!-- feedback -->
<div class="feedback-container">
<div class="feedback-title">
<strong>Tip Amount</strong>
<br />
<span>/ person</span>
</div>
<span class="feedback-amount tip-per-person"
>$4.27</span
>
</div>
<div class="feedback-container">
<div class="feedback-title">
<strong>Total</strong>
<br />
<span>/ person</span>
</div>
<span class="feedback-amount total-tips-sum"
>$32.79</span
>
</div>
<!-- reset button -->
<button
type="button"
class="reset-btn transitioned-state"
form="tip-input-control-form"
>Reset</button
>
</div>
</div>
<!-- start running JavaScript immediately needed nodes have loaded -->
<script src="./script.js"></script>
</main>
<footer class="attribution">
Challenge by
<a
href="https://www.frontendmentor.io?ref=challenge"
target="frontend-mentor"
class="transitioned-state"
>Frontend Mentor</a
>. Coded by
<a
href="https://github.com/OnyedikachiOzoani"
target="github"
class="transitioned-state"
>Onyedikachi Ozoani</a
>.
</footer>
</body>
</html>