forked from viur-framework/flare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.html
47 lines (42 loc) · 1.1 KB
/
hello.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>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/css/style.min.css"/>
<!-- flip comments below to use local pyodide -->
<!-- Use Pyodide from CDN (default) -->
<script src="https://pyodide-cdn2.iodide.io/v0.16.1/full/pyodide.js"></script>
<!-- Use Pyodide from local /pyodide/-folder (run get-pyodide.py) -->
<!-- <script src="pyodide/pyodide.js"></script> -->
<script src="assets/js/init.js"></script>
<script>
window.addEventListener(
"load",
(event) => {
window.init = new init({
// Prelude to be executed before fetching local modules
// language=Python
//prelude: `
//import setuptools, micropip
//`,
// Fetch location for locally available Python modules
fetch: {
"flare": {
"path": "flare"
}
},
// Python code to be finally executed
// language=Python
kickoff: `
from flare import *
html5.Body().appendChild('<a href="https://www.viur.dev">Hello World</a>')
flare.popup.Alert("Hello World")
`
});
}
);
</script>
</head>
<body class="is-loading">
</body>
</html>