-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
215 lines (209 loc) · 8.88 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Tip Calculator - Calculate Tips Easily | Frontend Mentor</title>
<meta name="title" content="Tip Calculator - Calculate Tips Easily | Frontend Mentor" />
<meta name="description" content="Calculate tips easily with our Tip Calculator. Save time and ensure fair splits. Perfect for quick and accurate tipping calculations. Try now!" />
<meta name="keywords" content="tip calculator, online tip calculator, calculate tips, tipping, split bills, frontend mentor" />
<meta name="author" content="Alberto Raúl José" />
<link rel="canonical" href="https://alberto-rj.github.io/tip-calculator/" />
<!-- Open Graph Tags -->
<meta property="og:title" content="Tip Calculator - Calculate Tips Easily" />
<meta property="og:description" content="Use our Tip Calculator to calculate tips easily and fairly. Perfect for quick and accurate tipping calculations." />
<meta property="og:image" content="https://alberto-rj.github.io/tip-calculator/design/desktop-preview.jpg" />
<meta property="og:url" content="https://alberto-rj.github.io/tip-calculator" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Tip Calculator" />
<!-- Twitter Card Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Tip Calculator - Calculate Tips Easily" />
<meta name="twitter:description" content="Calculate tips with ease using our Tip Calculator. Perfect for quick and accurate tipping calculations." />
<meta name="twitter:image" content="https://alberto-rj.github.io/tip-calculator/design/desktop-preview.jpg" />
<meta name="twitter:site" content="@albertorauljose" />
<!-- Favicon, Manifest and Theme Color -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png" />
<link rel="mask-icon" href="assets/images/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="assets/images/favicon.ico" />
<link rel="manifest" href="manifest.json" />
<meta name="msapplication-TileColor" content="#2a150f" />
<meta name="msapplication-config" content="assets/images/browserconfig.xml" />
<meta name="theme-color" content="#00494d" />
<!-- JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Tip Calculator",
"description": "Calculate tips easily with our online Tip Calculator.",
"url": "https://alberto-rj.github.io/tip-calculator",
"applicationCategory": "Utility",
"operatingSystem": "All",
"author": {
"@type": "Person",
"name": "Alberto Raúl José"
}
}
</script>
<!-- CSS -->
<style>
@font-face {
font-family: 'Space Mono';
src: url(assets/fonts/SpaceMono-Bold.woff2) format(woff2);
font-weight: 700;
font-display: swap;
}
</style>
<link rel="stylesheet" href="styles/index.min.css" />
</head>
<body class="page">
<main class="content">
<!-- Brief introduction -->
<section
aria-labelledby="intro-heading"
class="visually-hidden"
>
<h1 id="intro-heading">Calculate Your Tips Accurately</h1>
<p>
Welcome to the Tip Calculator! Quickly and accurately calculate the tips and total amounts for your bill.
Simply enter the bill amount, select a tip percentage, and specify the number of people to split the bill.
It's fast, easy, and helps you avoid any tipping mishaps.
</p>
</section>
<div class="logo">
<a
class="logo__link"
href="index.html"
aria-label="Splitter - Home"
>
<img
src="assets/images/logo.svg"
alt=""
width="87"
height="54"
aria-hidden="true"
class="logo__icon"
/>
</a>
</div>
<div class="card">
<form class="form" novalidate id="form">
<div class="form__field">
<label for="bill-input" class="form__label">Bill</label>
<input
id="bill-input"
type="number"
inputmode="decimal"
pattern="^(\\d+|\\d+\\.\\d+)$"
step="0.01"
min="0"
max="9999"
aria-required="true"
required
class="form__input form__input--is-text-field form__input--has-dollar-icon"
/>
<span id="bill-alert" role="alert" aria-live="assertive" class="form__alert"></span>
</div>
<fieldset class="form__group">
<legend class="form__title">Select Tip %</legend>
<div class="form__grid">
<div class="form__radio">
<input type="radio" id="radio-1" value="5" name="tip" class="form__radio-input" />
<label for="radio-1" class="form__radio-label">5%</label>
</div>
<div class="form__radio">
<input type="radio" id="radio-2" value="10" name="tip" class="form__radio-input" />
<label for="radio-2" class="form__radio-label">10%</label>
</div>
<div class="form__radio">
<input type="radio" id="radio-3" value="15" name="tip" class="form__radio-input" />
<label for="radio-3" class="form__radio-label">15%</label>
</div>
<div class="form__radio">
<input type="radio" id="radio-4" value="25" name="tip" class="form__radio-input" />
<label for="radio-4" class="form__radio-label">25%</label>
</div>
<div class="form__radio">
<input type="radio" id="radio-5" value="50" name="tip" class="form__radio-input" />
<label for="radio-5" class="form__radio-label">50%</label>
</div>
<div class="form__field">
<input
id="custom-tip-input"
type="number"
inputmode="decimal"
pattern="^(\\d+|\\d+\\.\\d+)$"
placeholder="custom"
min="0"
max="100"
step="0.01"
class="form__input form__input--is-text-field form__input--has-placeholder"
/>
<span id="tip-alert" role="alert" aria-live="assertive" class="form__alert"></span>
</div>
</div>
</fieldset>
<div class="form__field">
<label for="number-of-people-input" class="form__label">
Number of People
</label>
<input
id="number-of-people-input"
type="number"
inputmode="numeric"
pattern="^\\d+$"
min="1"
max="100"
aria-required="true"
required
class="form__input form__input--is-text-field form__input--has-person-icon"
/>
<span id="nop-alert" role="alert" aria-live="assertive" class="form__alert"></span>
</div>
</form>
<section aria-labelledby="output-heading" class="output">
<div class="visually-hidden">
<h2 id="output-heading">Calculation Results</h2>
<p>
These are the calculated results for the tip amount and total
amount per person based on the values you entered.
</p>
</div>
<div class="output__header">
<p aria-live="polite" class="output__heading">
<span id="tip-amount-heading" class="output__name">
<span class="visually-hidden">Tip amount per person</span>
<span aria-hidden="true" class="output__big">Tip Amount</span>
<span aria-hidden="true" class="output__small">/ person</span>
</span>
<span id="tip-amount-data" class="output__value">$0.00</span>
</p>
<p aria-live="polite" class="output__heading">
<span id="total-heading" class="output__name">
<span class="visually-hidden">Total per person</span>
<span aria-hidden="true" class="output__big">Total</span>
<span aria-hidden="true" class="output__small">/ person</span>
</span>
<span id="total-data" class="output__value">$0.00</span>
</p>
</div>
<button
id="reset-btn"
type="button"
disabled
class="output__btn"
>
<span aria-hidden="true">Reset</span>
<span class="visually-hidden">Reset all inputs and calculated results</span>
</button>
</section>
</div>
</main>
<!-- JS -->
<script async="defer" src="src/index.min.js"></script>
</body>
</html>