generated from hrbrmstr/slightly-more-than-minimal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (38 loc) · 1.69 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="./favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon/favicon-16x16.png">
<link rel="manifest" href="./favicon/site.webmanifest">
<!--<link href="./style.css" rel="stylesheet">//-->
<link href="./index.css" rel="stylesheet">
<script src="https://unpkg.com/blockly/blockly.min.js"></script>
<script type="module" src="./main.js"></script>
<title>🧪 🕸️ Minimal WebR + Blockly based on Bob Rudis' work</title>
</head>
<body>
<h1>🧪 🕸️ Minimal WebR + Blockly based on Bob Rudis' work</h1>
<div class="widget" id="status-message">Please wait…initializing WebR …</div>
<div id="pageContainer">
<div id="outputPane">
<div id="fileInputPane">
<input type="file" id="file-input" disabled>
</div>
<pre id="generatedCode"><code></code></pre>
<pre id="output"></pre>
</div>
<div id="blocklyDiv"></div>
</div>
Bob added also a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates">Tag Function</a> so you can do:
<pre class="text-output">
await R`sample(100, 5)`
</pre>
<p>and it'll "<code>evalR</code>" and "<code>toJs</code>" the code between the template string.</p>
<p>Copy that to the clipboard, open DevTools and try it!</p>
<p><a href="https://github.com/gdbassett/slightly-more-than-minimal-blockly/tree/batman">Get it on GitHub</a>.</p>
</body>
</html>