-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
82 lines (80 loc) · 2.12 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Pyodide Webworker Console</title>
<script src="https://cdn.jsdelivr.net/npm/jquery"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script>
<link
href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css"
rel="stylesheet"
/>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css"
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/prism.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/components/prism-python.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/prism.js"></script>
<style>
:root {
--size: 1.5;
--background: transparent;
--color: #bbb;
}
.cancelled {
color: #777 !important;
}
body {
background: black;
margin: 0pt;
/* margin-left: 1ch; */
}
.cmd-wrapper {
margin-left: 4ch;
}
.terminal {
/* 20pt is the total amount of vertical padding */
min-height: calc(100vh - 20pt);
flex-grow: 1;
margin-left: -3ch;
padding: 0;
padding-bottom: 50vh;
}
.console-wrapper {
display: flex;
flex-direction: row;
padding: 10pt;
}
.cmd-line {
margin-left: -3ch;
}
.console-prompt-margin {
z-index: -1;
width: 2ch;
user-select: none;
position: unset;
display: flex;
flex-direction: column;
}
.cmd-prompt {
height: 0px !important;
}
</style>
</head>
<body>
<div class="console-wrapper">
<div class="console-prompt-margin cmd"></div>
<div class="terminal"></div>
</div>
<script type="module">
import { term, pyodide, init as initInner } from "./index.js";
async function init() {
await initInner();
window.pyodide = pyodide;
window.term = term;
}
init();
</script>
</body>
</html>