generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
271 lines (265 loc) · 14.3 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="CO2 Calculator" content="Calculate your emissions" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="shortcut icon" type="image/png" href="docs/images/perspaleta1_0048.png">
<title>CO2 Calculator</title>
</head>
<body>
<!--Navigation-->
<header class="sticky-top" id="header">
<nav>
<div>
<a href="index.html">
<img src="docs/images/perspaleta1_0048.png" alt="Petrol pump logo" class="logo img-fluid"
loading="lazy">
</a>
<h1 class="title-1">
CO2
</h1>
<h1 class="title-2">
Calculator
</h1>
</div>
<div class="switch-location">
<label class="switch">
<input type="checkbox" onclick="toggleTheme()">
<span class="slider round">
<i class="far fa-lightbulb light-theme"></i>
<i class="fas fa-lightbulb dark-theme"></i>
</span>
</label>
</div>
</nav>
</header>
<!--Site Introduction-->
<section class="statement-paragraph">
<div class="overflow-auto">
<p> The purpose of this calculator is to show the impact that carbon emissions have on the environment. We
All
want to improve our planet, as you have shown by searching for a carbon offset calculator. With this
calculator we want to try and show the impact we are all having on our planet.
</p>
<p class="d-none d-md-block">
<q>
The climate crisis is both the easiest and the hardest issue we have ever faced. The easiest because
we
know what we must do. We must stop the emissions of greenhouse gases. The hardest because our
current
economics are still totally dependent on burning fossil fuels, and thereby destroying ecosystems in
order to
create everlasting economic growth.
</q>
<i>Greta Thunburg.</i>
</p>
</div>
</section>
<!--Calculator-->
<section class="co2-google-maps">
<div class="co2-calculator-heading">
<h1 class="text-center">CO<sub>2</sub> Calculator</h1>
<div class="nav col-xs-offset-2 col-xs-10 d-flex justify-content-center">
<div class="calculator-button">
<div class="nav-item" id="calculatorRoute">
<a class="nav-link active btn" role="button" onclick="calculatorDisplay()">Switch
CO<sub>2</sub> Calculator</a>
</div>
</div>
</div>
</div>
<div id="calculatorChoiceRoute">
<!--Center input fields and place icons next to input fields using bootstrap d-flex-->
<div class="container-fluid">
<div class="form-group col-xs-offset-2 col-xs-10 d-flex justify-content-center">
<label for="from" class="col-xs-2 control-label"><i class="far fa-play-circle icon"></i></label>
<input type="text" id="from" placeholder="Origin" class="form-control calc-border">
</div>
<div class="form-group col-xs-offset-2 col-xs-10 d-flex justify-content-center">
<label for="to" class="col-xs-2 control-label"><i class="fas fa-flag-checkered icon"></i></label>
<input type="text" id="to" placeholder="Destination" class="form-control calc-border">
</div>
<div class="col-xs-offset-2 col-xs-10 d-flex justify-content-center">
<button class="btn btn-success" onclick="calculateRoute();">
Calculate CO<sub>2</sub> <i class="fas fa-route"></i>
</button>
</div>
<div id="output">
</div>
<div id="googleMap">
</div>
<div id="calculation">
</div>
</div>
</div>
<!--Second Calculator-->
<div class="container-fluid" id="calculatorChoiceDistance">
<p> This calculator is ideal if you know the distance of your trip but are not sure what the route was. All
you need to do is enter the distance and your preferred choice of distance type and fuel type. This will
then show you your CO <sub>2</sub> output from that trip.
</p>
<div class="myCalculator">
<div class="col-xs-offset-2 col-xs-10 d-flex justify-content-center calculatorSpacing">
<input type="number" id="totalDistance" class="calc-border" name="myDistance"
placeholder="Total Distance...">
</div>
<div id="distanceType"
class="col-xs-offset-2 col-xs-10 d-flex justify-content-center calculatorSpacing">
<select class="custom-select my-1 mr-sm-2 calc-border" id="inlineFormCustomSelectPref">
<option selected>Distance Type...</option>
<option value="1.60934" id="Miles">Miles</option>
<option value="1" id="Kilometers">Kilometers</option>
</select>
</div>
<div id="fuelType" class="col-xs-offset-2 col-xs-10 d-flex justify-content-center calculatorSpacing">
<select class="custom-select my-1 mr-sm-2 calc-border" id="inlineFormCustomSelectPref1">
<option selected>Fuel Type...</option>
<option value="0.12" id="Petrol">Petrol</option>
<option value="0.132" id="Diesel">Diesel</option>
</select>
</div>
<div id="carbonResult">
</div>
<div id="totalCarbon" class="col-xs-offset-2 col-xs-10 d-flex justify-content-center">
<button type="button" class="btn btn-success" data-type="submit" onclick="calculateCarbon()"
id="calcSubmit">Calculate <i class="fas fa-calculator"></i>
</button>
</div>
</div>
</div>
</section>
<!--Offset Initiatives Section-->
<section class="offset-program-section">
<!--Bootstrap carousel-->
<div class="bd-example">
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active" data-interval="10000">
<img src="docs/images/shell-logo.png" class="d-block carousel-img" alt="Shell Petrol Logo"
loading="lazy">
<div class="carousel-caption">
<p class="d-none d-md-block">
Shell is one of the first companies to offer customers purchasing fuel to
offset that
amount of petrol. All that is required is the customer has the Shell Go+ app or
the
shell card.
<br>
<a href="https://www.shell.co.uk/media/2019-media-releases/drivers-set-to-go-carbon-neutral-with-shell.html"
target="_blank" class="btn btn-primary link-btn" role="button" rel="noreferrer">
Read More Here <i class="fas fa-external-link-alt"></i>
</a>
</p>
<p class="carousel-caption d-md-none overflow-auto">
Shell Go+ customers get all fuel purchases offset.
<br>
<a href="https://www.shell.co.uk/media/2019-media-releases/drivers-set-to-go-carbon-neutral-with-shell.html"
target="_blank" class="btn btn-primary link-btn" role="button" rel="noreferrer">
Read More Here <i class="fas fa-external-link-alt"></i>
</a>
</p>
</div>
</div>
<div class="carousel-item" data-interval="10000">
<img src="docs/images/bulb-logo-pink.png" class="d-block carousel-img bulb-img"
alt="Bulb energy logo" loading="lazy">
<div class="carousel-caption">
<p class="d-none d-md-block">
Bulb offers a carbon offset subscription. For as little as £5 you can offset
your
emissions. These emissions include petrol, food, clothes, household electricity
and
household gas.
<br>
<a href="https://bulb.co.uk/carbon-calculator/" target="_blank"
class="btn btn-primary link-btn" role="button" rel="noreferrer">
Subscribe Now <i class="fas fa-external-link-alt"></i>
</a>
</p>
<p class="carousel-caption d-md-none overflow-auto">
Offset your carbon for as little as £5.
<br>
<a href="https://bulb.co.uk/carbon-calculator/" target="_blank"
class="btn btn-primary link-btn" role="button" rel="noreferrer">
Subscribe Now <i class="fas fa-external-link-alt"></i>
</a>
</p>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</section>
<!--Footer Section-->
<footer>
<div class="col-sm-4 uppercase general-sub text-center">
<ul class="list-inline">
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.facebook.com" target="_blank">
<i class="fab fa-facebook" aria-hidden="true"></i>
<span class="sr-only">Facebook</span>
</a>
</li>
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.twitter.com" target="_blank">
<i class="fab fa-twitter-square" aria-hidden="true"></i>
<span class="sr-only">Twitter</span>
</a>
</li>
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.youtube.com" target="_blank">
<i class="fab fa-youtube-square" aria-hidden="true"></i>
<span class="sr-only">YouTube</span>
</a>
</li>
</ul>
<ul class="list-inline">
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.instagram.com" target="_blank">
<i class="fab fa-instagram" aria-hidden="true"></i>
<span class="sr-only">Instagram</span>
</a>
</li>
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.instagram.com" target="_blank">
<i class="fab fa-telegram" aria-hidden="true"></i>
<span class="sr-only">Telegram</span>
</a>
</li>
<li class="list-inline-item">
<a class="footer-link-colour" rel="noreferrer" href="https://www.pinterest.co.uk/" target="_blank">
<i class="fab fa-pinterest" aria-hidden="true"></i>
<span class="sr-only">Pinterest</span>
</a>
</li>
</ul>
</div>
</footer>
<!---Google maps API-->
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAHyCRJaxWY3e_azOmciazJlLZYPp8i028&libraries=places"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<!-- Site Scripts-->
<script src="assets/js/script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>