-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (104 loc) · 5.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tip calculator app</title>
<link rel="shortcut icon" href="images/favicon-32x32.png" type="image/x-icon">
<!-- bootstrap css -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- Custom css -->
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<header>
<h2 class="fs-3 fw-bold text-center mt-5">SPLI</h2>
<h2 class="fs-3 fw-bold text-center mb-5">TTER</h2>
</header>
<main>
<section class="main-section d-flex justify-content-center">
<div class="card mb-3" style="max-width: 840px;">
<div class="row g-4 p-4">
<div class="col-md-6 p-4">
<h5 class="fs-6">Bill</h5>
<div class="input d-flex flex-row justify-content-between mb-4">
<span><img class="ms-2 mt-1" src="images/icon-dollar.svg" alt="dollar-sign"></span>
<input id="bill-value" class="container-fluid border-0 text-end fs-4" type="text"
placeholder="0.00">
</div>
<small class="text-danger mb-4" id="bill-error" style="display: none;">Can't input zero or
negative number</small>
<h5 class="fs-6">Select tip %</h5>
<div id="tip" class="row gy-2 mb-4">
<div class="col-6 col-md-4"><button
class="tip-percent btn btn-primary container-fluid fs-4 fw-bold">5%</button>
</div>
<div class="col-6 col-md-4"><button
class="tip-percent btn btn-primary container-fluid fs-4 fw-bold">10%</button>
</div>
<div class="col-6 col-md-4"><button
class="tip-percent btn btn-primary container-fluid fs-4 fw-bold">15%</button>
</div>
<div class="col-6 col-md-4"><button
class="tip-percent btn btn-primary container-fluid fs-4 fw-bold">25%</button>
</div>
<div class="col-6 col-md-4"><button
class="tip-percent btn btn-primary container-fluid fs-4 fw-bold">50%</button>
</div>
<div class="col-6 col-md-4">
<input id="custom-value"
class="tip-percent custom container-fluid border-0 text-center fw-bold" type="text"
placeholder="Custom">
</div>
<small class="text-danger mb-3" id="custom-error" style="display: none;">Can't input zero
or negative number</small>
</div>
<h5 class="fs-6">Number of people</h5>
<div class="input d-flex flex-row justify-content-between">
<span><img class="ms-2 mt-1" src="images/icon-person.svg" alt="dollar-sign"></span>
<input id="person-value" class="container-fluid border-0 text-end fs-4" type="text"
value="1">
</div>
<small class="text-danger mt-4" id="person-error" style="display: none;">Can't input text or
negative number</small>
</div>
<div class="calc col-md-6 p-4">
<div class="card-body">
<div class="d-flex justify-content-between">
<div>
<h5 class="fs-5 fw-bold text-white">Tip Amount</h5>
<p class="fs-6 text-secondary">/ person</p>
</div>
<div>
<h1 class="fs-1 fw-bold">$<span id="tip-value">0</span></h1>
</div>
</div>
<div class="d-flex justify-content-between">
<div>
<h5 class="fs-5 fw-bold text-white">Total</h5>
<p class="fs-6 text-secondary">/ person</p>
</div>
<div>
<h1 class="fs-1 fw-bold">$<span id="total-value">100</span></h1>
</div>
</div>
<div class="mt-5 pt-5">
<button id="reset-btn" class="btn active container-fluid">RESET</button>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer>
<p class="text-center my-4 text-secondary fw-bold">Developed by <a class="text-decoration-none"
href="https://github.com/arifulsajib">Ariful
Islam</a> , 2021</p>
</footer>
<!-- js -->
<script src="js/main.js"></script>
</body>
</html>