-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
256 lines (213 loc) · 7.7 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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chaac</title>
<meta name="description" content="Chaac is the perfect assistant for your watering" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script>
function switchLight(){
location.reload();
}
// Get the modal
var modal = document.getElementById('myModal');
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
function displayModal() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
<style>
h3 {
color: #fff;
}
li {
padding-bottom: 20px;
}
li.positive {
border-left: 10px solid #69B369;
}
li.negative {
border-left: 10px solid #E64444;
}
li.warning {
border-left: 10px solid #ED9B27;
}
.green {
color: #69B369;
}
.red {
color: #E64444;
}
.orange {
color: #ED9B27;
}
.blue {
color: #2F8FAC;
}
.box {
display: inline-block;
font-family: Helvetica, sans-serif;
margin-left: 10px;
}
.img-box {
width: 48px;
height: 48px;
border-radius: 5px;
vertical-align: center;
}
ul>li>i {
margin-right: 20px;
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
border: 1px solid #888;
width: 30%; /* Could be more or less, depending on screen size */
}
/* The Close Button */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
</style>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">x</span>
<h2>Watering</h2>
<form>
How many liters: <br>
<input type="number">
<button>Start</button>
</form>
</div>
</div>
<body>
<div class="image-preload">
<img src="img/drop-color.png" alt="">
<img src="img/drop-alpha.png" alt="">
<img src="img/weather/texture-rain-fg.png" />
<img src="img/weather/texture-rain-bg.png" />
</div>
<div class="slideshow">
<canvas width="1" height="1" id="container" style="position:absolute"></canvas>
<div class="container" role="main">
<div class="page-header">
<h1>Chaac prototype</h1>
</div>
<div class="row">
<div class="col-sm-4">
<h3><i class="fa fa-tint blue" aria-hidden="true"></i> Watering</h3>
<ul class="list-group">
<li onclick="displayModal()" class="list-group-item positive"><b>Area A</b> watered <b class="green">2 hours</b> ago <br/> (832L total)</li>
<li onclick="displayModal()" class="list-group-item negative"><b>Area B</b> watered <b class="red">8 days</b> ago <br/> (442L total)</li>
<li onclick="displayModal()" class="list-group-item warning"><b>Area C</b> watered <b class="orange">2 days</b> ago <br/> (666L total)</li>
</ul>
<h3><i class="fa fa-line-chart orange" aria-hidden="true"></i> Counter</h3>
<ul class="list-group">
<li class="list-group-item positive"><b class="green">0L/s</b> currently<br/><b class="green">1337L</b> total</li>
</ul>
</div><!-- /.col-sm-4 -->
<img src="img/chaac_by_dragonfly929.png" class="img-responsive col-sm-4"/>
<div class="col-sm-4">
<h3><i class="fa fa-lightbulb-o orange" aria-hidden="true"></i> Lights</h3>
<ul class="list-group">
<li onclick="switchLight()" class="list-group-item negative"><b>Light 1</b> is <b class="red">off</b></li>
<li onclick="switchLight()" class="list-group-item positive"><b>Light 2</b> is <b class="green">on</b><br/> since 10 min</li>
</ul>
<h3><i class="fa fa-superpowers blue" aria-hidden="true"></i> Pump</h3>
<ul class="list-group">
<li class="list-group-item positive">Currently <b class="green">inactive</b><br/>Since <b class="green">2 hours</b></li>
</ul>
</div><!-- /.col-sm-4 -->
</div>
<div class="row">
<div class="col-sm-6">
<h3><i class="fa fa-history red" aria-hidden="true"></i> History</h3>
<ul class="list-group">
<li class="list-group-item"><i class="fa fa-lightbulb-o fa-2x orange" aria-hidden="true"></i><b>Switch on</b> light <b>2</b> (10 min ago)</li>
<li class="list-group-item"><i class="fa fa-tint fa-2x blue" aria-hidden="true"></i><b>200L</b> on area <b>A</b> (2 hours ago)</li>
<li class="list-group-item"><i class="fa fa-tint fa-2x blue" aria-hidden="true"></i><b>150L</b> on area <b>C</b> (2 days ago)</li>
</ul>
</div><!-- /.col-sm-6 -->
<div class="col-sm-6">
<h3><i class="fa fa-list-ol green" aria-hidden="true"></i> Pending</h3>
<ul class="list-group">
<li class="list-group-item"><i class="fa fa-times fa-2x red" aria-hidden="true"></i>Watering <b>30L</b> on area <b>B</b> (ETA 1min)</li>
<li class="list-group-item"><i class="fa fa-times fa-2x red" aria-hidden="true"></i>Watering <b>60L</b> on area <b>C</b> (ETA 3min)</li>
</ul>
</div><!-- /.col-sm-6 -->
</div>
</div>
</div>
<p class="nosupport">Sorry, but your browser does not support WebGL!</p>
</div>
<!-- /container -->
<script src="js/index.min.js"></script>
<script src="https://code.jquery.com/jquery-3.1.1.js" integrity="sha256-16cdPddA6VdVInumRGo6IbivbERE8p7CQR3HzTBuELA=" crossorigin="anonymous"></script>
<script>
// Get the modal
var modal = document.getElementById('myModal');
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
function displayModal() {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>