-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
86 lines (78 loc) · 3.55 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
<!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 -->
<link rel="icon" type="image/png" sizes="32x32" href="./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=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="resources/css/style.css">
<title>Tip calculator app</title>
</head>
<body>
<header class="flex">
<img class="logo" src="images/logo.svg" alt="splitter site logo">
</header>
<main>
<div class="calculator">
<div class="inner-calculator flex">
<div class="upper-calc">
<section class="bill">
<h2 class="header">Bill</h2>
<span id="errorBill" class="error">Can't be zero</span>
<div class="input-container flex">
<img src="images/icon-dollar.svg" alt="dollar icon">
<span><input class="input" type="number" min="0" id="total-bill" placeholder="0.00"></span>
</div>
</section>
<section class="tip-selection">
<h2 class="header">Select Tip %</h2>
<div class="btn-container grid">
<button class="btn" id="5percent">5%</button>
<button class="btn" id="10percent">10%</button>
<button class="btn" id="15percent">15%</button>
<button class="btn" id="25percent">25%</button>
<button class="btn" id="50percent">50%</button>
<input min="0" type="number" class="custom" id="custom" placeholder="Custom">
</section>
<section class="count-selection">
<div class="people-count flex">
<h2 class="header">Number of People</h2>
<span id="errorPeople" class="error">Can't be zero</span>
<div class="input-container flex">
<img src="images/icon-person.svg" alt="icon for the count of people">
<span><input class="input" id="count" type="number" min="0" placeholder="1"></span>
</div>
</div>
</section>
</div>
<section class="display-total-container">
<div class="amounts-container">
<div class="amount-display-container flex">
<div class="tip-amount">
<h3>Tip Amount</h3>
<span class="per-person">/ person</span>
</div>
<span id="tip-per-person" class="total-display">$0.00</span>
</div>
<div class="amount-display-container flex">
<div class="total">
<h3>Total</h3>
<span class="per-person">/ person</span>
</div>
<span id="tip-total" class="total-display">$0.00</span>
</div>
</div>
<button class="btn reset" id="reset">RESET</button>
</section>
</div>
</div>
</main>
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Handcoded by <a href="https://github.com/Kijimai">Kijimai</a>.
</div>
<script src="resources/js/script.js" type="text/javascript"></script>
</body>
</html>