-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
77 lines (72 loc) · 1.79 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>YALI.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css" />
<style>
textarea {
height: 250px;
}
.code-area {
display: flex;
flex-wrap: wrap-reverse;
}
pre#error {
margin-top: -12px;
transition: max-height 1s;
}
.error {
color: #d24b46;
background-color: #ffeff0;
}
.col {
width: 100%;
}
@media all and (min-width: 600px) {
.code-area {
flex-wrap: initial;
}
.col:first-child {
margin-right: 1em;
}
}
</style>
</head>
<body>
<h2>
YALI.js: Yet Another Lox Interpreter. Javascript Implementation
</h2>
<div>
<label for="exampleProgram">Example Program:</label>
<select name="exampleProgram" id="exampleProgram"></select>
</div>
<div class="code-area">
<div class="col">
<label for="code">Code: </label>
<textarea id="code" cols="50" rows="15"></textarea>
<div>
<button id="run">
Run
</button>
<button id="format" class="button-outline">
Format
</button>
</div>
</div>
<div class="col">
<label for="output">Output: </label>
<textarea id="output" cols="50" rows="15" readonly></textarea>
<pre id='error' style="max-height: 0"><code id='errorText'></pre>
</div>
</div>
<div>
<small>
Please open your javascript console with <key>Command + Option + J (Mac) or Control + Shift + J (Windows, Linux, Chrome OS)</key>
</small>
</div>
<script src="browser.js"></script>
</body>
</html>