-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
295 lines (289 loc) · 13 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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Webduino code samples">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1, maximum-scale=1">
<meta itemprop="description" content="Client-side Webduino code samples">
<meta itemprop="name" content="Webduino code samples">
<meta name="mobile-web-app-capable" content="yes">
<link rel="stylesheet" type="text/css" href="samples.css" media="screen">
<base target="_blank">
<title>Webduino samples</title>
</head>
<body>
<header class="container">
<img src="img/logo.png" alt="">
<h2>範例大集合</h2>
</header>
<div class="container">
<hr>
</div>
<div style="width: 100%;">
<div id="myBtnContainer" class="container">
<button class="btn active" onclick="filterSelection('all')"> 全部</button>
<button class="btn" onclick="filterSelection('tools')"> 小工具</button>
<button class="btn" onclick="filterSelection('samples')"> 應用範例</button>
</div>
<!-- Portfolio Gallery Grid -->
<div class="container">
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/dogyear/" target="_blank">
<div class="content">
<img src="img/dog-newyear.jpg" alt="sample" style="width:100%">
<h4>狗年吉祥話</h4>
<h4>Dog New Year</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/dogyear/riddle.html" target="_blank">
<div class="content">
<img src="img/riddle.jpg" alt="sample" style="width:100%">
<h4>元宵猜謎趣</h4>
<h4>New Year Riddle</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/pm25/" target="_blank">
<div class="content">
<img src="img/pm25.jpg" alt="sample" style="width:100%">
<h4>PM2.5 空氣偵測器</h4>
<h4>PM2.5 Air Detector</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/fortune/" target="_blank">
<div class="content">
<img src="img/tarot.jpg" alt="sample" style="width:100%">
<h4>RFID 塔羅牌</h4>
<h4>RFID Tarot</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/lucky-draw/" target="_blank">
<div class="content">
<img src="img/lucky-draw.jpg" alt="sample" style="width:100%">
<h4>RFID 抽獎</h4>
<h4>RFID Lucky Draw</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/insect/index.html#DiviceID" target="_blank">
<div class="content">
<img src="img/hexapod.jpg" alt="sample" style="width:100%">
<h4>六足昆蟲機器人</h4>
<h4>Hexapod Robot</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/car/smart-car.html#DeviceID" target="_blank">
<div class="content">
<img src="img/mobile-control-car.jpg" alt="sample" style="width:100%">
<h4>遙控自走車 ( Smart )</h4>
<h4>Robot Car Controller</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/car/mobile.html#DeviceID" target="_blank">
<div class="content">
<img src="img/mobile-control-car.jpg" alt="sample" style="width:100%">
<h4>遙控自走車 ( 馬克一號 )</h4>
<h4>Robot Car Controller</h4>
</div>
</a>
</div>
<div class="column tools">
<a href="http://webduinoio.github.io/samples/content/oled/converter.html" target="_blank">
<div class="content">
<img src="img/oled.jpg" alt="tool" style="width:100%">
<h4>OLED 圖片轉換器</h4>
<h4>OLED Image Converter</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="https://webduinoio.github.io/samples/content/trump-hair/ultrasonic.html" target="_blank">
<div class="content">
<img src="img/trumphair-ultrasonic.jpg" alt="sample" style="width:100%">
<h4>川普吹頭髮 - 超音波</h4>
<h4>Trump's Hair - Ultrasonic</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="https://webduinoio.github.io/samples/content/trump-hair/sound.html" target="_blank">
<div class="content">
<img src="img/trumphair-sound.jpg" alt="sample" style="width:100%">
<h4>川普吹頭髮 - 聲音感測</h4>
<h4>Trump's Hair - Sound</h4>
</div>
</a>
</div>
<div class="column tools">
<a href="http://webduinoio.github.io/samples/content/line-following-robot/" target="_blank">
<div class="content">
<img src="img/following-car.jpg" alt="tool" style="width:100%">
<h4>循跡自走車</h4>
<h4>Line Following Robot</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/googlemaps/button-led/" target="_blank">
<div class="content">
<img src="img/ledgooglemap.jpg" alt="sample" style="width:100%">
<h4>Google Map 點亮 LED 燈</h4>
<h4>LED with Google Map</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/googlesheets/button-led/" target="_blank">
<div class="content">
<img src="img/ledgooglesheets.jpg" alt="sample" style="width:100%">
<h4>網頁點燈 + Google 試算表紀錄</h4>
<h4>LED with Google Sheets</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/demo/firebase-im/" target="_blank">
<div class="content">
<img src="img/firebaseim.jpg" alt="sample" style="width:100%">
<h4>Webduino IoT 聊天室</h4>
<h4>Firebase IM</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/controller-robot/JVkL.html" target="_blank">
<div class="content">
<img src="img/robot-controller.jpg" alt="sample" style="width:100%">
<h4>拳擊機器人遙控器</h4>
<h4>Robot Controller</h4>
</div>
</a>
</div>
<div class="column tools">
<a href="http://webduinoio.github.io/demo/max7219/" target="_blank">
<div class="content">
<img src="img/maxmatrix.jpg" alt="tool" style="width:100%">
<h4>LED 點矩陣代碼產生器</h4>
<h4>Matrix Code Generator</h4>
</div>
</a>
</div>
<div class="column tools">
<a href="http://webduinoio.github.io/samples/content/buzzer-piano/" target="_blank">
<div class="content">
<img src="img/buzzer-piano.jpg" alt="tool" style="width:100%">
<h4>蜂鳴器鋼琴</h4>
<h4>Buzzer Virtual Piano</h4>
</div>
</a>
</div>
<div class="column tools">
<a href="http://webduinoio.github.io/samples/content/rgbled-palette/" target="_blank">
<div class="content">
<img src="img/rgbled.jpg" alt="tool" style="width:100%">
<h4>三色 LED 調色盤</h4>
<h4>RGB LED Palette</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/demo/max7219-happynewyear/" target="_blank">
<div class="content">
<img src="img/2016newyear.jpg" alt="sample" style="width:100%">
<h4>過年測字遊戲</h4>
<h4>Max7219 Chinese New Year</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/controller/" target="_blank">
<div class="content">
<img src="img/smart-home.jpg" alt="sample" style="width:100%">
<h4>智慧家庭</h4>
<h4>Smart Home Controller</h4>
</div>
</a>
</div>
<div class="column samples">
<a href="http://webduinoio.github.io/samples/content/toycar/" target="_blank">
<div class="content">
<img src="img/controller.jpg" alt="sample" style="width:100%">
<h4>飛天魚手機遙控器</h4>
<h4>Controller</h4>
</div>
</a>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="line"></div>
<div class="w-50">
<p>2018 Webduino All Rights Reserved.</p>
</div>
<div class="w-50">
<a href="https://www.facebook.com/webduino" target="_blank"><img src="img/facebook.png" alt=""></a>
<a href="https://webduino.io/" target="_blank"><img src="img/globe.png" alt=""></a>
</div>
</div>
</footer>
<script>
filterSelection("all") // Execute the function and show all columns
function filterSelection(c) {
var x, i;
x = document.getElementsByClassName("column");
if (c == "all") c = "";
// Add the "show" class (display:block) to the filtered elements, and remove the "show" class from the elements that are not selected
for (i = 0; i < x.length; i++) {
w3RemoveClass(x[i], "show");
if (x[i].className.indexOf(c) > -1) w3AddClass(x[i], "show");
}
}
// Show filtered elements
function w3AddClass(element, name) {
var i, arr1, arr2;
arr1 = element.className.split(" ");
arr2 = name.split(" ");
for (i = 0; i < arr2.length; i++) {
if (arr1.indexOf(arr2[i]) == -1) {
element.className += " " + arr2[i];
}
}
}
// Hide elements that are not selected
function w3RemoveClass(element, name) {
var i, arr1, arr2;
arr1 = element.className.split(" ");
arr2 = name.split(" ");
for (i = 0; i < arr2.length; i++) {
while (arr1.indexOf(arr2[i]) > -1) {
arr1.splice(arr1.indexOf(arr2[i]), 1);
}
}
element.className = arr1.join(" ");
}
// Add active class to the current button (highlight it)
var btnContainer = document.getElementById("myBtnContainer");
var btns = btnContainer.getElementsByClassName("btn");
for (var i = 0; i < btns.length; i++) {
btns[i].addEventListener("click", function() {
var current = document.getElementsByClassName("active");
current[0].className = current[0].className.replace(" active", "");
this.className += " active";
});
}
</script>
</body>
</html>