-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
335 lines (296 loc) · 8.43 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>io language REPL</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/home.css">
<link rel="stylesheet" href="/home_header.css">
<link rel="stylesheet" href="/fonts/Helvetica/fonts.css">
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<style>
::-webkit-scrollbar {
width: 15px;
height: 15px;
}
::-webkit-scrollbar-track-piece {
background-color: #191919;
}
::-webkit-scrollbar-thumb:vertical {
background-color: #555;
}
.section {
font-family: "Helvetica Neue Bold", sans-serif;
font-weight: 600;
padding-top: 15px;
padding-bottom: 15px;
border-top: solid 1px #444;
}
.code {
margin-left: 30px;
line-height: 22px;
margin-bottom: 40px;
/*font-weight: 500;*/
font-family: "Helvetica Neue Bold", sans-serif;
color: #ddd;
max-width: 600px;
white-space: pre-wrap;
}
.text {
animation: fadein 2s;
max-width: 600px;
}
.resultcontainer {
display: flex;
margin: auto;
line-height: 1.1em;
height: fit-content;
}
.resultarrow {
display: inline-block;
color: #99c;
/*content: '→ ';*/
vertical-align: text-top;
padding-right: 0.5em;
}
.result {
white-space: pre-line;
display: inline-block;
color: #99c;
margin: 0px;
padding: 0px;
white-space: pre-wrap;
left-padding: 0em;
}
.replPair {
white-space: pre-wrap;
}
@media only screen and (max-width: 475px) {
.code {
font-size: 1em;
margin-left: 0px;
}
}
.help {
font-size: 1em;
font-weight: normal;
border: #444 0px solid;
background-color: transparent;
color: #444;
padding-top: 0em;
padding-bottom: 0em;
padding-left: 0.75em;
padding-right: 0.75em;
margin-top: 0.2em;
width: fit-content;
}
table td {
padding: 3px;
padding-left: 0.5em;
padding-right: 1.5em;
border-top: thin solid;
border-bottom: thin solid;
border-right: thin solid;
}
table td:first-child {
border-left: thin solid;
}
table td:last-child {
border-right: thin solid;
}
td {
font-size: 1em;
line-height: 1em;
font-weight: normal;
border: #444 0px solid;
background-color: transparent;
color: #444;
padding-top: 0em;
padding-bottom: 0em;
padding-left: 0.75em;
padding-right: 0.75em;
margin-top: 0.2em;
width: fit-content;
}
.button {
font-size: 1em;
font-weight: normal;
border: #444 1px solid;
background-color: transparent;
color: #666;
padding-left: 0.5em;
padding-right: 0.5em;
width: fit-content;
padding-top: 0.1em;
padding-bottom: 0.1em;
}
.button:hover {
border: #888 1px solid;
color: #aaa;
}
.inputsection {
border-left: 1px solid #666;
}
.input {
white-space: pre-line;
color: white;
background-color: transparent;
border-color: #444;
display: inline-block;
font-family: helvetica, sans;
font-weight: bold;
font-size: 1em;
outline: none;
border: none;
width: 100%;
min-width: 100%;
resize: none;
margin-top: 1em;
margin-bottom: 0em;
padding-left: 2em;
height: fit-content;
spellcheck: off;
overflow: hidden;
/*transition: opacity 0.5s;*/
}
.output {
white-space: pre-line;
font-family: helvetica, sans;
font-weight: bold;
font-size: 1em;
border-left: 1px solid #666;
width: 100%;
min-width: 100%;
resize: none;
margin-top: 1em;
margin-bottom: 1em;
min-height: 0em;
padding-left: 2em;
}
.repl {
opacity: 0;
}
.status {
font-family: helvetica, sans;
font-weight: bold;
color: white;
animation: fadein 2s;
opacity: 1;
}
select {
text-transform: uppercase;
outline: none;
user-select: none;
border-radius: 0px;
-webkit-appearance:none;
padding-left: 0.5em;
padding-top: 0em;
padding-bottom: 0em;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-right: 6em;
/*
background: url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" stroke="#666666"/></svg>') 100% 50% no-repeat #fff;
*/
}
.error {
color: red;
}
</style>
<script src="Boot.js" type="module"></script>
</head>
<body>
<div class="container leftSpace">
<div class="header">
<div class="pageHeader">
<div class="topSpace"></div>
<div class="pageTitle"><a href="/index.html">Io</a></div>
<div class="pageSubtitle"> / repl </div>
</div>
</div>
<div id="status" class="status">
Loading Io compiled to WASM...
</div>
<div id="repl" class="repl">
<div class=section style="width: 100%; border: none; color: #666;">
<!-- OUTPUT -->
</div>
<div class="text" style="">
<div class="output" id="output">
</div>
<div style="display: none;">
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1 style=""display:none; width: 100%; height: 0px;"></canvas>
</div>
<div class=section style="width: 100%; border: none; color: #666;">
<!-- INPUT -->
</div>
<div id="inputsection" class="inputsection">
<textarea class="input" id="input" spellcheck="false"></textarea>
</div>
<br>
<br>
<div class="helpsection">
<div style=""margin-bottom:0.5em;">
<input class="button" type="button" value="EVAL" title="Evaluate expression" onclick="Repl.shared().onInput()">
<select class="button" name="" id="SampleMenu" onchange="Repl.shared().onSampleMenu(this)" title="Code samples">
<option value='"Hello world!"'>Hello World</option>
<option value='System platform .. " " .. System platformVersion'>System</option>
<option value='1 + 2'>Math</option>
<option value='b := 2 * 3
b'>Variables</option>
<option value='a := 2
if(a == 1, "a is one", "a is not one")'>Conditions</option>
<option value='List clone append(30, 10, 5, 20)'>Lists</option>
<option value='for(i, 1, 10, writeln(i, " "))'>For Loop</option>
<option value='List clone append(30, 10, 5, 20) foreach(i, v, writeln(i, ": ", v))'>Foreach Loop</option>
<option value='Lobby'>Lobby</option>
<option value='Lobby Protos Core'>Core Protos</option>
<option value='System sleep(2)'>Sleep</option>
</select>
<input class="button" type="button" value="SOURCE" title="Evaluate expression" onclick="s = 'https://github.com/stevedekorte/ioWasm'; window.open(s)">
<!--
<input class="button" type="button" value="SAVE" title="Save system image" onclick="WasmState.shared().store()">
<input class="button" type="button" value="LOAD" title="Load system image" onclick="WasmState.shared().load()">
-->
</div>
<br>
<table cellpadding="0" cellspacing="0" width="fit-content" style="border: 1px solid #444;" rules="none">
<tbody>
<tr>
<td>EVAL</td>
<td>CONTROL + RETURN</td>
</tr>
<tr>
<td>CLEAR</td>
<td>CONTROL + SHIFT + U</td>
</tr>
<tr>
<td>HISTORY</td>
<td>CONTROL + ARROW UP/DOWN</td>
</tr>
<tr>
<td>TOGGLE HELP</td>
<td>CONTROL + H</td>
</tr>
<tr>
<td>SAVE SYSTEM IMAGE</td>
<td>CONTROL + S</td>
</tr>
<tr>
<td>LOAD SYSTEM IMAGE</td>
<td>CONTROL + L</td>
</tr>
</tbody>
</table>
<!--
<br>
<a href="https://github.com/stevedekorte/ioWasm">ioWasm source on github</a>
-->
</div>
<br><br><br>
</div>
</div>
</div>
</body>
</html>