-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (55 loc) · 1.64 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WebIOPi | Light Control</title>
<script type="text/javascript" src="/webiopi.js"></script>
<script type="text/javascript">
webiopi().ready(function() {
// Create a "Light" labeled button for GPIO 17
var button = webiopi().createGPIOButton(17, "Light");
$("#controls").append(button);
// Append button to HTML element with ID="controls" using jQuery
var button = webiopi().createAngleSlider(23);
$("#controls").append(button);
// Refresh GPIO buttons
// pass true to refresh repeatedly of false to refresh once
webiopi().refreshGPIO(true);
});
</script>
<style type="text/css">
html {
background-color:#000000;
background-image:url('/img/iot.jpg');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
background-size:cover;
}
button {
display: inline-block;
margin: 5px 5px 5px 5px;
padding:5px;
width: 160px;
height: 45px;
font-size: 22pt;
font-weight: bold;
color: black;
text-shadow: 1px 1px 1px rgba(255,255,255, .22);
border-radius: 30px; //curved borders
// transition: all 0.15s ease;
}
#gpio17.LOW {
background-color: Gray;
color: Black;
}
#gpio17.HIGH {
background-color: Blue;
color: LightGray;
}
</style>
</head>
<body>
<div id="controls" align="center"></div>
</body>
</html>