-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (47 loc) · 2.67 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
<!doctype html>
<html>
<head>
<title>Magic Blue</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Origin Trial Token, feature = Web Bluetooth, origin = https://urish.github.io, expires = 2017-01-24 -->
<meta http-equiv="origin-trial" data-feature="Web Bluetooth" data-expires="2017-01-24" content="AkHwGzaZWjkkErTNEgXn3R3rT8pTJzgFXwVYVP1gkWIbxTchTkCjbj3pKaMbDXe8oDvq3pgvZ6N2UcSfgX0TvwsAAABaeyJvcmlnaW4iOiAiaHR0cHM6Ly91cmlzaC5naXRodWIuaW86NDQzIiwgImZlYXR1cmUiOiAiV2ViQmx1ZXRvb3RoIiwgImV4cGlyeSI6IDE0ODUyNzA5Njh9">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
<link rel="stylesheet" href="styles.css" />
<link rel="manifest" href="manifest.json" />
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
</head>
<body>
<div class="app-layout mdl-layout mdl-js-layout">
<main class="mdl-layout__content">
<h3>Web Light Bulb</h3>
<button onclick="connect()" class="connect-button mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
<i class="material-icons">bluetooth</i> Connect
</button>
<div class="power-button hidden">
<button onclick="turnOnOff()" class="mdl-button mdl-js-button mdl-button--fab mdl-button--raised mdl-js-ripple-effect">
<i class="material-icons">lightbulb_outline</i>
</button>
</div>
<div class="color-buttons hidden">
<button onclick="red()" class="mdl-button mdl-js-button mdl-button--fab mdl-button--raised mdl-js-ripple-effect" style="background:#ffa0a0">
R
</button>
<button onclick="green()" class="mdl-button mdl-js-button mdl-button--fab mdl-button--raised mdl-js-ripple-effect" style="background:#a0ffa0">
G
</button>
<button onclick="blue()" class="mdl-button mdl-js-button mdl-button--fab mdl-button--raised mdl-js-ripple-effect" style="background:#a0a0ff">
B
</button>
</div>
<div class="mic-button hidden">
<button onclick="listen()" class="mdl-button mdl-js-button mdl-button--fab mdl-button--raised mdl-js-ripple-effect">
<i class="material-icons">microphone</i>
</button>
</div>
</main>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.4.0/annyang.min.js"></script>
<script src="bulb.js"></script>
</body>
</html>