-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (110 loc) · 3.56 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
<!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="./images/favicon-32x32.png"
/>
<link rel="stylesheet" type="text/css" href="style.css" />
<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:wght@700&display=swap"
rel="stylesheet"
/>
<title>Tip calculator app</title>
<style>
.attribution {
font-size: 11px;
text-align: center;
}
.attribution a {
color: hsl(228, 45%, 44%);
}
</style>
</head>
<body>
<main>
<div class="main-message-container">
<h1 class="main-message">SPLI<br />TTER</h1>
</div>
<div class="calc-container">
<div class="bill-container input-content">
<div class="bill-message">
<h3>Bill</h3>
<h3 class="error-text invisible" id="error-message2">
Numbers only
</h3>
</div>
<div class="input-container">
<img
alt="A dollar symbol"
src="images/icon-dollar.svg"
aria-hidden="true"
/>
<input type="text" id="bill" placeholder="0" maxlength="6" />
</div>
</div>
<div class="tip-container input-content">
<h3>Select tip %</h3>
<div class="tip-buttons">
<button>5%</button>
<button>10%</button>
<button>15%</button>
<button>25%</button>
<button>50%</button>
<input id="custom-input" placeholder="Custom" maxlength="3" />
</div>
</div>
<div class="people-container input-content">
<div class="people-headers">
<h3>Number of People</h3>
<h3 class="error-text invisible" id="error-message1">
Numbers only
</h3>
</div>
<div class="input-container">
<img
alt="A cartoon of a person"
src="images/icon-person.svg"
aria-hidden="true"
/>
<input type="text" id="people" placeholder="0" maxlength="4" />
</div>
</div>
<div class="result-container">
<div class="amount-container result-content">
<div class="message-container">
<p class="result-message">Tip Amount</p>
<p class="per-person-message">/ person</p>
</div>
<p class="result-display" id="tip-amount">$0.00</p>
</div>
<div class="total-container result-content">
<div class="message-container">
<p class="result-message">Total</p>
<p class="per-person-message">/ person</p>
</div>
<p class="result-display" id="total-amount">$0.00</p>
</div>
<div class="button-container">
<button id="reset-button" alt="Reset button">RESET</button>
</div>
</div>
</div>
<div style="display: none">
Bill Select Tip % 5% 10% 15% 25% 50% Custom Number of People Tip Amount
/ person Total / person Reset
</div>
<div class="attribution">
Coded by
<a href="https://github.com/SartHak-0-Sach">Sarthak Sachdev</a>.
</div>
<script src="script.js"></script>
</main>
</body>
</html>