/
playground.html
109 lines (92 loc) · 2.02 KB
/
playground.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loxdown Playground</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#fafafa">
<link rel="stylesheet" href="css/codemirror.css">
<style type="text/css">
body {
height: 100vh;
margin: 0;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
.row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
height: 100vh;
}
.column {
display: flex;
flex-direction: column;
flex-basis: 100%;
flex: 1;
}
.control-bar {
display: flex;
height: 50px;
border-bottom: 1px solid #ddd;
background-color: #f7f7f7;
}
.control-bar button {
margin: 2px 0px;
padding-left: 25px;
padding-right: 25px;
}
.control-bar h4 {
line-height: 50px;
padding: 0px 15px;
margin: 0;
}
#run-button {
margin-left: auto;
}
.output {
height: 100%;
padding: 5px;
font-family: monospace;
font-size: 110%;
white-space: pre;
border: none;
border-right: 1px solid lightgrey;
resize: none;
}
.CodeMirror {
height: 100%;
}
.output .error {
color: maroon;
}
.syntax-error, .static-error, .runtime-error {
color: maroon;
}
.success {
color: darkgreen;
}
</style>
</head>
<body>
<div class="row">
<div class="column">
<div class="control-bar">
<h4>Loxdown</h4>
<button id="run-button">
Run
</button>
</div>
<textarea id="source-code-box" class="code-box"></textarea>
</div>
<div class="column">
<div class="control-bar">
<h4 id="output-title"> </h4>
</div>
<div id="output" class="output"></div>
</div>
</div>
<script src="js/playground.js"></script>
</body>
</html>