-
Notifications
You must be signed in to change notification settings - Fork 0
/
RenderBlocks.html
37 lines (37 loc) · 1.26 KB
/
RenderBlocks.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
<html lang="en">
<head>
<title>MakeCode Blocks Rendering</title>
<style>
html {font-family: Arial, Helvetica, sans-serif}
.boxdiv {padding:5px; display:inline-block; border: solid; background-color: lightgray}
</style>
</head>
<body id="body" style="background-color: #D0FFD0">
<h1>MakeCode Blocks Rendering</h1>
<h2>Add a MakeCode project
<button onclick="clearScreen()">Clear</button>
<button onclick="renderSnippets()">Render projects</button>
</h2>
<table>
<tr>
<th>Using JavaScript code <button onclick="addCode()">Add</button></th>
<th>Using a MakeCode project <button onclick="addProject()">Add</button></th>
</tr>
<tr>
<th><textarea id="makecodeCode" rows="15" cols="75">
basic.showString("Hello World!");
basic.forever(() => {
led.toggle(0, 0);
basic.pause(100);
}</textarea>
</th>
<th><input type="text" id="makecodeProject" value="_HjWJo9eHjXwP"/></th>
</tr>
</table>
<!-- <pre id="pre1" pub="_HjWJo9eHjXwP"></pre> -->
<!-- <pre id="pre2" pub="_6fT9haLmrFkC"></pre> -->
<!-- <pre id="pre3" pub="_XXD3iuF36HCF"></pre> -->
<p id="mainBlocks"></p>
<script src="RenderBlocks.js"></script>
</body>
</html>