-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
112 lines (107 loc) · 3.55 KB
/
index.html
File metadata and controls
112 lines (107 loc) · 3.55 KB
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" />
<!-- displays site properly based on user's device -->
<!-- !TODO:merge tryouts to main
to make the Frontend Mentor div
css max-height fully fill the screen with .calculator box?
-->
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./images/favicon-32x32.png"
/>
<title>Frontend Mentor | Tip calculator app</title>
<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=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="./css/main.css" />
</head>
<body>
<div class="wrapper">
<div class="name"></div>
<div class="calculator">
<div class="left-col">
<div class="bill">
<div class="bill-on-top">
<p>Bill</p>
<span id="input-error-bill"></span>
</div>
<input
type="text"
maxlength="10"
inputmode="numeric"
pattern="[0-9]"
id="amount"
class="bill-amnt"
placeholder="0"
onkeypress="isInputNumber(event)"
/>
</div>
<div class="tip-selection-wrap">
<span>Select Tip %</span>
<div class="tip-selection">
<button value="5" id="5" class="btn">5%</button>
<button value="10" id="10" class="btn">10%</button>
<button value="15" id="15" class="btn">15%</button>
<button value="25" id="25" class="btn">25%</button>
<button value="50" id="50" class="btn">50%</button>
<input
type="text"
id="custom-percent"
inputmode="numeric"
pattern="[0-9]"
class="custom-percent"
placeholder="Custom"
/>
</div>
</div>
<div class="people">
<div class="people-on-top">
<p>Number of People</p>
<span id="input-error-people"></span>
</div>
<input
type="text"
id="people-num"
class="people-num"
inputmode="numeric"
pattern="[0-9]"
placeholder="0"
maxlength="5"
/>
</div>
</div>
<div class="right-col">
<div class="tip-amount">
<div class="total-sum">
<span class="top">Tip Amount</span>
<span class="bot">/ person</span>
</div>
<span id="tip" class="final-number">$0.00</span>
</div>
<div class="total">
<div class="total-result">
<span class="top">Total</span> <span class="bot">/ person</span>
</div>
<span id="total" class="final-number">$0.00</span>
</div>
<button class="reset-btn" id="go">Reset</button>
</div>
</div>
<div class="attribution">
Challenge by
<a href="https://www.frontendmentor.io?ref=challenge" target="_blank"
>Frontend Mentor</a
>. Coded by <a href="https://github.com/BessonovMax">Max Bessonov</a>.
</div>
</div>
<script src="./js/main.js"></script>
</body>
</html>