-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
110 lines (108 loc) · 4.86 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Freight Calculator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="inputsContainerHeader">
<div class="inputsPerBlocksHeader">
<p><b>CIRCLE2:</b> VET and SMEs on the road to CE</p>
</div>
<div class="inputsPerBlocksHeader">
<p style="text-align: end;"><b>Project No:</b> 2022-1-LT01-KA220-VET-000085809</p>
</div>
</div>
<h1>Freight Calculator</h1>
<div id="inputNameProduct">
<div class="form-group">
<label for="product">Product:</label>
<input type="text" id="product" name="product" placeholder="Enter Product name"> <!--from origin to product-->
</div>
</div>
<!-- cost block -->
<div id="inputsContainer">
<!-- <div id="cost-inputs" class="inputsPerBlocks">
<h3>Cost per Kg</h3>
<div class="cost-group">
<label for="truck-cost">Truck:</label>
<input type="number" id="truck-cost" name="truckCost" min="0" placeholder="Enter Cost per Kg">
</div>
<div class="cost-group">
<label for="train-cost">Train:</label>
<input type="number" id="train-cost" name="trainCost" min="0" placeholder="Enter Cost per Kg">
</div>
<div class="cost-group">
<label for="plane-cost">Plane:</label>
<input type="number" id="plane-cost" name="planeCost" min="0" placeholder="Enter Cost per Kg">
</div>
<div class="cost-group">
<label for="ship-cost">Ship:</label>
<input type="number" id="ship-cost" name="shipCost" min="0" placeholder="Enter Cost per Kg">
</div>
</div> -->
<!-- co2 emission block -->
<div id="co2-inputs" class="inputsPerBlocks">
<h3>Emission Factor (EF) in kg CO2e / tonne.km</h3>
<div class="cost-group">
<label for="co2-truck">Truck:</label>
<input type="number" id="co2-truck" name="co2Truck" min="0" placeholder="Enter the EF (ex.: 0.108)">
</div>
<div class="cost-group">
<label for="co2-train">Train:</label>
<input type="number" id="co2-train" name="co2Train" min="0" placeholder="Enter the EF (ex.: 0.065)">
</div>
<div class="cost-group">
<label for="co2-plane">Plane:</label>
<input type="number" id="co2-plane" name="co2Plane" min="0" placeholder="Enter the EF (ex.: 0.1116)">
</div>
<div class="cost-group">
<label for="co2-ship">Ship:</label>
<input type="number" id="co2-ship" name="co2Ship" min="0" placeholder="Enter the EF (ex.: 0.03)">
</div>
</div>
</div>
<!-- calculation block -->
<form id="freight-form">
<div class="form-group">
<label for="origin">Origin:</label>
<input type="text" id="origin" name="origin" placeholder="Enter Origin City">
</div>
<div class="form-group">
<label for="destination">Destination:</label>
<input type="text" id="destination" name="destination" placeholder="Enter Destination City">
</div>
<div class="form-group">
<label for="weight">Weight (tonne):</label>
<input type="number" id="weight" name="weight" min="1" placeholder="Enter Weight">
</div>
<div class="form-group">
<label for="transport">Transportation Type:</label>
<select id="transport" name="transport">
<option value="truck">Truck</option>
<option value="train">Train</option>
<option value="plane">Plane</option>
<option value="ship">Ship</option>
</select>
</div>
<div class="form-group">
<label for="distance">Distance (km):</label>
<input type="number" id="distance" name="distance" min="1" placeholder="Enter Distance">
</div>
<button type="button" id="calculate-button">Calculate Cost</button>
</form>
<!-- results block -->
<div id="result-container">
<h4 id="result-title">Calculation History</h4>
<ul id="calculation-list"></ul>
<p id="total-cost">Total Cost: <span id="total-cost-value">0.00</span> €</p>
<p id="total-co2-impact">Total CO2 Impact: <span id="total-co2-impact-value">0.00</span> kg CO2e</p>
</div>
<div id="export-container">
<button id="export-button">Export to CSV</button>
</div>
<script src="script.js"></script>
</body>
</html>