-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (38 loc) · 1.76 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
<!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">
<script type="module" src="./main.js"></script>
<title>🧪 🕸️ Actual Minimal WebR App Shell With Pyodide</title>
</head>
<body>
<h1>🧪 🕸️ Actual Minimal WebR App Shell With Pyodide</h1>
<div class="widget" id="status-message">Please wait…initializing WebR & Pyodide…</div>
<div>
<button id="r-button" disabled>Get some random numbers from R</button>
<pre class="text-output" id="r-output"> </pre>
</div>
<div>
<button id="py-button" disabled>Get some random numbers from Python</button>
<pre class="text-output" id="py-output"> </pre>
</div>
<div>
<button id="rpy-button" disabled>Get some random numbers from R that uses an array supplied by Python</button>
<pre class="text-output" id="rpy-output"> </pre>
</div>
I 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/hrbrmstr/slightly-more-than-minimal/tree/batman">Get it on GitHub</a>.</p>
</body>
</html>