-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
94 lines (85 loc) · 3.81 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Electricity Consumption Calculator</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="lib/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style/main.css">
</head>
<body>
<div class="container" id="container">
<h1 class="text-center">Electricity Consumption Calculator</h1>
<!-- Form Starting -->
<div id="form-container">
<div class="row" id="main-inputs-0">
<div class="col-md-3">
<div class="form-group">
<input class="form-control" id="device" placeholder="Name of device" name="device"><i class="fa fa-television" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<input type="number" id ="quantity" min="0" class="form-control" value="" placeholder="Quantity" name="quantity" data-bind="value: quantity"><i class="fa fa-shopping-basket" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<input type="number" min="0" class="form-control" value="0" placeholder="Capacity (WAT)" name="capacity" data-bind="value: capacity"><i class="fa fa-bolt" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<input type="number" min="0" class="form-control" value="0" placeholder="Daily Operating Hours" name="daily-operating-hours" data-bind="value: dailyOperatingHours"><i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="col-md-1 resultCol">
<span data-bind="text: rowResult" class="resultColVal"></span> <span class="unit">WAT</span>
</div>
<div class="col-md-1 resultCol text-center">
<i class="fa fa-times" aria-hidden="true" data-bind="click: removeRow"></i>
</div>
</div>
</div>
<div class="row text-center">
<div class="col-md-12">
<button class="btn btn-primary btn-lg addNewButton" type="button" id="addNewRowButton"><i class="fa fa-plus-circle" aria-hidden="true"></i>
Add a device</button>
</div>
</div>
<div id="result">
<div class="row">
<div class="col-md-10 text-right finalResultText">
<h4>Total Consumption </h4>
</span>
</div>
<div class="col-md-2 finaleResultCol text-center">
<span class="finalResult text-info" data-bind="text: totalConsumption"></span> <span class="unit">WAT</span>
</div>
</div>
<div class="row">
<div class="col-md-10 text-right finalResultText">
<h4> Total consumption with loss of efficiency </h4>
</span>
</div>
<div class="col-md-2 text-center finaleResultCol">
<span class="finalResult text-info" data-bind="text: totalConsumptionWithLossOfEfficiency"></span> <span class="unit">WAT</span></div>
</div>
<div class="row" >
<div class="col-md-10 text-right">
</div>
<div class="col-md-2 text-right">
<button class="btn btn-default btn-lg btn-block" type="button" id="printPDF"><i class="fa fa-print" aria-hidden="true"></i>
Print</button>
</div>
</div>
</div> <!-- .container end -->
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="lib/knockout-3.4.2.js"></script>
<script src="js/main.js"></script>
</body>
</html>