|
1 | 1 | <template id="head"> |
2 | 2 | <meta charset="utf-8"> |
3 | 3 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
4 | | - <title>Webduino Blockly - 伺服馬達</title> |
| 4 | + <title data-translation="title">Webduino Blockly - 伺服馬達</title> |
5 | 5 | <!-- webduino --> |
6 | 6 | <script src="https://webduino.io/components/webduino-js/dist/webduino-all.min.js"></script> |
7 | 7 | <script src="https://blockly.webduino.io/webduino-blockly.js"></script> |
8 | 8 | <script src="https://blockly.webduino.io/lib/runtime.min.js"></script> |
9 | 9 | </template> |
10 | 10 | <template id="body"> |
11 | | - <button id="btnLeft90">左轉 90 度</button> |
12 | | - <button id="btnLeft60">左轉 60 度</button> |
13 | | - <button id="btnLeft30">左轉 30 度</button><br/> |
14 | | - <button id="btnCenter">保持在中間</button><br/> |
15 | | - <button id="btnRight30">右轉 30 度</button> |
16 | | - <button id="btnRight60">右轉 60 度</button> |
17 | | - <button id="btnRight90">右轉 90 度</button> |
| 11 | + <div class="centerBox"> |
| 12 | + <button id="btnLeft90" data-translation="btnLeft90">左轉 90 度</button> |
| 13 | + <button id="btnLeft60" data-translation="btnLeft60">左轉 60 度</button> |
| 14 | + <button id="btnLeft30" data-translation="btnLeft30">左轉 30 度</button><br> |
| 15 | + </div> |
| 16 | + <div class="centerBox"> |
| 17 | + <button id="btnCenter" data-translation="btnCenter">保持在中間</button><br> |
| 18 | + </div> |
| 19 | + <div class="centerBox"> |
| 20 | + <button id="btnRight30" data-translation="btnRight30">右轉 30 度</button> |
| 21 | + <button id="btnRight60" data-translation="btnRight60">右轉 60 度</button> |
| 22 | + <button id="btnRight90" data-translation="btnRight90">右轉 90 度</button> |
| 23 | + </div> |
18 | 24 | </template> |
19 | 25 | <template id="css"> |
20 | | -button{ |
21 | | - font-size:16px; |
22 | | - margin:5px; |
23 | | - padding:10px; |
| 26 | +.centerBox { |
| 27 | + text-align: center; |
| 28 | +} |
| 29 | + |
| 30 | +button { |
| 31 | + font-size: 16px; |
| 32 | + margin: 5px; |
| 33 | + padding: 10px; |
24 | 34 | } |
25 | 35 | </template> |
0 commit comments