-
Notifications
You must be signed in to change notification settings - Fork 0
/
play.html
66 lines (61 loc) · 2.47 KB
/
play.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
<html>
<head>
<title>The Reason Playground</title>
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.15.2/codemirror.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.15.2/codemirror.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/theme/monokai.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/theme/solarized.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.15.2/mode/mllike/mllike.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.15.2/mode/javascript/javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.15.2/addon/edit/matchbrackets.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/addon/edit/closebrackets.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="/static/url.min.js"></script>
<script src="/static/playground.js"></script>
<link rel="stylesheet" href="/static/style.css">
<script>
'use strict';
$(document).ready(function() {
if(window.self !== window.top) {
$("body").addClass("embedded");
}
playground({
'runEl': '#run, #embedRun',
'fmtEl': '#fmt',
'shareEl': '#share',
'shareURLEl': '#shareURL',
'inputEl': '#recode',
'outputEl': '#output',
'embedEl': '#embed',
'embedPopEl': '#embedPop',
'embedOutEl': '#embedOut',
'style': {
'font-size': url('?font-size')
}
});
});
</script>
</head>
<body>
<input type="button" value="Run" id="embedRun">
<div id="banner">
<div id="head" itemprop="name"><img src="/static/logo.png" id="logo"> Playground</div>
<div id="controls">
<input type="button" value="Run" id="run">
<input type="button" value="Format" id="fmt">
<input type="button" value="Share" id="share">
<input type="text" id="shareURL">
<input type="button" value="Embed" id="embed">
</div>
</div>
<div id="recode" name="recode">{{printf "%s" .Body}}</div>
<div id="output"></div>
<div id="embedPop" class="popout">
<div class="popout-content">
<h4>Copy & Paste Code</h4>
<textarea itemprop="description" id="embedOut" spellcheck="false" readonly></textarea>
</div>
</div>
</body>
</html>