-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (51 loc) · 2.13 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css">
<title>Journey Cost Calculator</title>
</head>
<body>
<div class="container my-5">
<h1 class="mb-5">Journey Cost Calculator</h1>
<div class="card mb-5">
<div class="card-body">
<div class="row">
<div class="col-4 mb-5">
<label class="form-label">Journey Distance (Miles):</label>
<input class="form-control" type="number" id="miles" placeholder="Greater than 0">
</div>
<div class="col-4 mb-5">
<label class="form-label">Fuel Efficiency (MPG):</label>
<input class="form-control" type="number" id="mpg" placeholder="Greater than 0">
</div>
<div class="col-4 mb-5">
<label class="form-label">Fuel Price (Pence Per Litre):</label>
<input class="form-control" type="number" id="fuel-price" placeholder="Greater than 0">
</div>
</div>
<div class="row">
<div class="col-4 mb-5">
<label class="form-label">Litres Needed:</label>
<input class="form-control" type="number" id="litres-needed" readonly>
</div>
<div class="col-4 mb-5">
<label class="form-label">Journey Cost:</label>
<input class="form-control" type="number" id="journey-cost" readonly>
</div>
<div class="col-4 mb-5">
<label class="form-label">Cost Per Mile:</label>
<input class="form-control" type="number" id="cost-per-mile" readonly>
</div>
</div>
<button class="btn btn-primary" onclick="calculate();">Calculate</button>
</div>
</div>
<div class="alert alert-primary">Calculations are approximate and don't take into account factors such as passengers, tire pressure and weather conditions.</div>
<div class="alert alert-primary mb-5">Gallons are measured in British Imperial format (1 Gallon = 4.54609 Litres).</div>
<p>Developed by <a href="https://robertd.co.uk">Robert Dixon</a></p>
</div>
<script src="js/script.js"></script>
</body>
</html>