1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Blockly Demo: Fixed Blockly</title>
- <script src="../../blockly_compressed.js"></script>
- <script src="../../blocks_compressed.js"></script>
- <script src="../../msg/js/en.js"></script>
- <style>
- body {
- background-color: #fff;
- font-family: sans-serif;
- }
- h1 {
- font-weight: normal;
- font-size: 140%;
- }
- </style>
- </head>
- <body>
- <h1><a href="https://developers.google.com/blockly/">Blockly</a> >
- <a href="../index.html">Demos</a> > Fixed Blockly</h1>
- <p>This is a simple demo of injecting Blockly into a fixed-sized 'div' element.</p>
- <p>→ More info on <a href="https://developers.google.com/blockly/guides/configure-blockly/web/fixed-size">injecting fixed-sized Blockly</a>…</p>
- <div id="blocklyDiv" style="height: 480px; width: 600px;"></div>
- <xml id="toolbox" style="display: none">
- <block type="controls_if"></block>
- <block type="logic_compare"></block>
- <block type="controls_repeat_ext"></block>
- <block type="math_number"></block>
- <block type="math_arithmetic"></block>
- <block type="text"></block>
- <block type="text_print"></block>
- </xml>
- <script>
- var workspace = Blockly.inject('blocklyDiv',
- {media: '../../media/',
- toolbox: document.getElementById('toolbox')});
- </script>
- </body>
- </html>
|