-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtimes.html
65 lines (65 loc) · 1.56 KB
/
times.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
<html>
<head>
<script src='hosted.js'></script>
<script src='times.js'></script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
color: #444;
margin: 0 auto;
padding: 5px;
user-select: none;
}
.day {
width: 80px;
height: 20px;
margin: 1px;
padding: 2px;
display: inline-block;
}
.hour {
width: 20px;
height: 20px;
margin: 1px;
padding: 2px;
display: inline-block;
background-color: tomato;
cursor: pointer;
}
.hour.active {
background-color: lightgreen;
}
.title {
color: #333;
margin-top: 10px;
padding-top: 5px;
border-top: 1px solid #eee;
}
.red {
color: red;
}
.green {
color: green;
}
</style>
</head>
<body>
<div id='config'></div>
<div class='title'>
Select during which hours of each weekday your device should be active. <span class='green'>Green</span> means your
device is active, <span class='red'>red</span> means your device is in sleep mode. You can click and drag to change
multiple hours at once.
</div>
<script>
ib.getConfig(function(times) {
var times = times_from_config(times);
var config = Config(times, function(times) {
ib.setConfig(times);
});
});
</script>
</body>
</html>