-
Notifications
You must be signed in to change notification settings - Fork 3
/
fuelcost.html
107 lines (93 loc) · 4.59 KB
/
fuelcost.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<title>
Fuel Cost Calculator
</title>
</head>
<body>
<!-- navbar -->
<main-header></main-header>
<div class="container p-3">
<div class="card m-auto shadow bg-white rounded mb-5 d-flex align-items-center"
style="max-width: 550px; min-width: 320px;">
<div class="card overflow-hidden border-0 rounded-0 text-center" style="max-height: 30vh;">
<img src="./img/fuelpump.jpg" style="max-width: 550px; min-width: 320px;" ; class="card-img rounded-0"
alt="...">
<div class="card-img-overlay d-flex align-items-center justify-content-center"
style="background-color: rgba(0,0,0,0.5);">
<h1 class="card-title text-uppercase text-light">Fuel Cost Calculator</h1>
</div>
</div>
<section class="container p-3">
<p class=small>Complete the sections below then click Submit Query to calculate your journey cost - you
can use
the adjustment arrows to see live changes to your calculation.
</p>
</section>
<div class="mx-auto">
<form id="calculator-form">
<div class="form-group">
<label for="distance">Distance <em>(miles)</em></label>
<div class="input-group mb-3">
<input type="number" id="distance" class="form-control">
<div class="input-group-append">
<div class="input-group-text">M</div>
</div>
</div>
<label for="fuel-price">Fuel Price / Litre <em>(pence)</em></label>
<div class="input-group mb-3">
<input type="number" id="fuel-price" class="form-control">
<div class="input-group-append">
<div class="input-group-text">p</div>
</div>
</div>
</div>
<label for="vehicle-mpg">Vehicle MPG <em>(UK average is 36-43)</em></label>
<div class="input-group mb-3">
<input type="number" id="vehicle-mpg" class="form-control">
</div>
<!-- <span id="button">
<input type="submit" class="btn btn-block btn-secondary" value="Submit">
</span> -->
<span id='submit'>
<input id='submitButton' style='margin-top: 2rem; margin-bottom: .5rem; height: 2.3rem'
type="submit" class="btn btn-sm btn-secondary btn-block" value="Submit" />
</span>
<!-- <button class="btn btn-sm btn-secondary btn-block" id='submit'
style='margin-top: 2rem; margin-bottom: .5rem; height: 2.3rem'>
Submit
</button> -->
</div>
</form>
<div id="result" class="mb-4">
<!-- <hr />
<h3 id="cost"></h3>
<hr /> -->
</div>
</div>
<!--form-group-->
<!--calculator-form-->
</div>
<!--mx-auto p-4-->
</div>
<!-- link to header.js (navbar). Do not remove -->
<script src="header.js"></script>
<!-- link to your app js file -->
<script src="fuelcost.js"></script>
<!-- bootstrap dependencies -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
crossorigin="anonymous"></script>
</body>
</html>