forked from ucsd-cse231-s22/chocopy-wasm-compiler-A
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (78 loc) · 2.94 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
83
84
85
86
87
88
89
90
<!doctype HTML>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/gh/AssemblyScript/wabt.js@1.0.20/index.js"></script>
<script>const wabt = WabtModule;</script>
<script src="webstart.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
.editor {
float: left;
width: 49%;
margin: 0;
padding: 10px;
height: 100%;
}
.user-code {
width: 100%;
height: 80em;
resize: none;
overflow: scroll;
font-family: monospace;
}
.interactions {
float: right;
width: 49%;
margin-left: 1em;
padding: 0;
height: 100%;
}
.repl-code {
height: 2em;
width: 30em;
text-align: left;
font-family: monospace;
}
.prompt {
vertical-align: middle;
}
.output pre {
max-width: 100%;
white-space: break-spaces;
line-break: anywhere;
}
</style>
</head>
<body>
<div class="editor">
<button type="button" class="btn btn-primary" id="run" style="margin-bottom: 10px">Run!</button>
<button class="btn btn-primary" id="clear" style="margin-bottom: 10px"> Clear! </button>
<button class="btn btn-primary" id="save"
style="margin-bottom: 10px; float:right; background-color:rgb(39, 173, 218)"> Save </button>
<input class="btn btn-primary" outerText="Load" id="load" name="Load" type="file"
style="height: 38px; width: 250px; text-align: center; margin-bottom: 10px; margin-right: 5px; float:right; background-color:rgb(38, 102, 185)"></input>
<div style="margin-bottom: 10px">
<span>Code example: </span>
<select name="code example" id="exampleSelect">
<option value="empty">--select--</option>
<option value="basic class">basic class</option>
<option value="nested class">nested class</option>
<option value="linkedlist class">linkedlist class</option>
<option value="cyclic linkedlist class">cyclic linkedlist class</option>
<option value="uninitialized member variable">uninitialized member variable</option>
</select>
</div>
<textarea class="user-code" id="user-code"></textarea>
</div>
<div class="interactions" style="margin-top: 100px">
<div class="output" id="output">
</div>
<div id="repl-entry">
<span class="prompt"><code>»</code></span>
<textarea type="text" id="next-code" class="repl-code"></textarea>
</div>
</div>
</body>
</html>