-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrunner.html
More file actions
189 lines (169 loc) · 4.23 KB
/
runner.html
File metadata and controls
189 lines (169 loc) · 4.23 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-store" />
<link href="css/normalize.css" rel="stylesheet">
<!-- Fontawesome (brands + solid) -->
<link href="css/fontawesome.css" rel="stylesheet">
<link href="css/brands.css" rel="stylesheet">
<link href="css/solid.css" rel="stylesheet">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
font-size: 1em;
}
#ide {
height: 100%;
display: flex;
flex-direction: column;
}
#header {
background: #eee;
color: #333;
padding: 0.5em;
flex: 0 0 auto;
}
#loading {
display: block; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
#loading-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
#output {
background: #fff;
color: #333;
flex: 1;
min-height: 0;
overflow-x: auto;
overflow-y: auto;
white-space: nowrap;
padding: 1rem;
box-sizing: border-box;
}
#output code {
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
font-size: 1em;
}
#output .scamper-output {
margin: 0.5em;
}
#output .scamper-trace {
background-color: #e5e5e5;
color: #222222;
border: dotted 1px black;
margin: 0.5em;
}
#output .test-result {
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
font-size: 1em;
margin: 0.5em;
padding: 0.25em;
border: dashed 1px black;
}
#output .test-result.ok {
background-color: #e5ffe5;
}
#output .test-result.error {
background-color: #ffe5e5;
}
.tree {
display: inline-block;
vertical-align: top;
justify-content: center;
align-items: flex-start;
padding-top: 40px;
margin-bottom: 60px;
border-top: 1px dashed #ccc;
padding-top: 20px;
}
.tree ul {
position: relative;
padding-top: 20px;
display: flex;
justify-content: center;
}
.tree li {
list-style-type: none;
text-align: center;
position: relative;
padding: 20px 5px 0 5px;
}
.tree li::before,
.tree li::after {
content: '';
position: absolute;
top: 0;
width: 50%;
height: 20px;
border-top: 1px solid #ccc;
}
.tree li::before {
right: 50%;
border-right: 1px solid #ccc;
}
.tree li::after {
left: 50%;
border-left: 1px solid #ccc;
}
.tree li > ul::before {
content: '';
position: absolute;
top: 0;
left: 50%;
border-left: 1px solid #ccc;
height: 20px;
}
.box {
display: inline-block;
padding: 8px 16px;
border: 1px solid #999;
border-radius: 16px;
background-color: #fff;
font-family: sans-serif;
font-size: 16px;
white-space: nowrap;
}
</style>
</head>
<body>
<div id="ide">
<div id="header">
<div class="text-align: left;">
Scamper <span id="version">{{ver}}</span> ⋅ <span id="current-file"></span>
</div>
</div>
<div id="output"></div>
</div>
<div id="loading">
<div id="loading-content">
Loading Scamper...
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", (event) => {
document.getElementById("loading").style.display = "none";
})
</script>
<script type="module" src="/src/web/runner.ts"></script>
</body>
</html>