-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
193 lines (179 loc) · 7.15 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
<!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">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;1,200&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
<title>Check Your Ride</title>
</head>
<body>
<div class="container">
<div class="headline">
<p class="title"> Check Your Ride </p>
</div>
<div class="leftBanner">
<div class="slideshow">
<div class="slide">
<img src="bmw.jpg" style="width:100%">
</div>
<div class="slide">
<img src="mercedes.jpg" style="width:100%">
</div>
<div class="slide">
<img src="maserati.jpg" style="width:100%">
</div>
<br>
<script>
var slideIndex = 0;
slideshow();
function slideshow() {
var i;
var slides = document.getElementsByClassName("slide");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {
slideIndex = 1
}
slides[slideIndex - 1].style.display = "block";
setTimeout(slideshow, 4000);
}
</script>
</div>
<div class="summary"></div>
<div class="opinions">
<h3>Customers Opinions</h3>
<table>
<tr>
<th colspan="2">User</th>
<th width="50%">Opinion</th>
</tr>
<tr>
<td><img src="user1.png" alt="user" /></td>
<td>The Anonim One</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. </td>
</tr>
<tr>
<td><img src="user2.png" alt="user" /></td>
<td>Don't know me</td>
<td>Lorem ipsum dolor sit amet, consectetur adipisicing elit. </td>
</tr>
</table>
</div>
</div>
</div>
<div class="rightBanner">
<div class="form">
<form>
<label for="road">How Many Kilometers Have You Done</label>
<input type="number" id="road" placeholder="100..">
<br>
<label for="consumption">Fuel Consumption In Liters Per 100 Kilometers</label>
<input type="number" id="consumption" placeholder="10..">
<br>
<label for="fuel">Fuel Type</label>
<select id="fuel">
<option value="gasoline">Gasoline</option>
<option value="diesel">Diesel</option>
<option value="gasolineLPG">Gasoline + LPG</option>
</select>
<br>
<input type="button" id="button" value="Submit">
</form>
<p id="result" class="result"></p>
</div>
<script>
function drivingQuote() {
let road = Number(document.getElementById("road").value);
let consumption = Number(document.getElementById("consumption").value);
let fuelType = document.getElementById("fuel").value;
let gasolinePrice = 5.21;
let dieselPrice = 5.08;
let gasolineLPGPrice = 2.38;
let totalConsumption = consumption * road / 100;
if (fuelType == "gasoline") {
totalPrice = totalConsumption * gasolinePrice;
} else if (fuelType == "diesel") {
totalPrice = totalConsumption * dieselPrice;
} else {
totalPrice = totalConsumption * gasolineLPGPrice;
}
totalConsumption = Math.round(totalConsumption * 100) / 100;
totalPrice = Math.round(totalPrice * 100) / 100;
document.getElementById("result").innerHTML = "Your Car Will Burn " + totalConsumption + " Liters <br><br> Your Trip Will Cost: " + totalPrice + " pln.";
}
document.getElementById("button").addEventListener("click", drivingQuote);
</script>
<div class="examples">
<h3>Combustion Examples For Various Engines*</h3>
<table>
<tr>
<th>Engine</th>
<th width="25%">1.5l</th>
<th width="15%">2l</th>
<th width="15%">3l</th>
<th width="15%">4l </th>
<th width="15%">5l</th>
</tr>
<tr>
<th>I4</th>
<td>7l</td>
<td>8l</td>
<td>10l</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<th>I6</th>
<td>-</td>
<td>10</td>
<td>13</td>
<td>15</td>
<td>17</td>
</tr>
<tr>
<th>V6</th>
<td>-</td>
<td>12l</td>
<td>14l</td>
<td>16l</td>
<td>18l</td>
</tr>
<tr>
<th>V8</th>
<td>-</td>
<td>-</td>
<td>15l</td>
<td>16l</td>
<td>19l</td>
</tr>
</table>
<p>*all results are estimated there may be differences for FWD, RWD or AWD and for pre-all driving style :)</p>
</div>
<div class="socialMedia">
<h3>Follow us:</h3>
<a href="https://www.facebook.com/toniedamian.ruczynski1/" target="_blank" class="fa fa-facebook"></a>
<a href="https://www.linkedin.com/in/damian-ruczy%C5%84ski-147b41213/" target="_blank" class="fa fa-linkedin"></a>
<a href="https://www.instagram.com/_rvczek_/" target="_blank" class="fa fa-instagram"></a>
</div>
</div>
<div class="footer">
<div class="copyright">
<p>Copyright <span>©</span> 2021 Damian Ruczyński</p>
</div>
<div class="contact">
<ul>
<li>Author: Damian Ruczynski</li>
<li>E-mail: [email protected]</li>
<li>Phone number: 511 388 146</li>
</ul>
</div>
</div>
</div>
</body>
</html>