-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
98 lines (86 loc) · 4.16 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
<!DOCTYPE html>
<html>
<head>
<title>TypeScript Playground</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rivets/0.9.6/rivets.bundled.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/typescript/4.0.2/typescript.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/split.js/1.0.0/split.min.js"></script>
</head>
<style>
/* needed for split.js functionality */
.gutter {
cursor: e-resize;
height: 100%;
background: rgb(240, 239, 239);
}
body {
background-color: rgb(242, 247, 251);
}
</style>
<body>
<div class="container text-center mt-2 mb-4">
<h3>
TypeScript Playground
<a href="https://github.com/nbarkhina/TypeScriptPlayground" target="_blank">
<img src="github_logo.png" style="height: 25px; padding-bottom: 5px; padding-left: 10px;">
</a>
</h3>
<div style="font-size: 10pt;">
Press CTRL + S to recompile
</div>
<button class="btn btn-primary mt-2" onclick="myApp.runApp()">Run Code</button>
<button class="btn btn-primary mt-2" onclick="myApp.shrink()">Shrink</button>
<button class="btn btn-primary mt-2" onclick="myApp.grow()">Grow</button>
<div>
<table style="margin-left: auto;margin-right: auto;margin-top: 10px;">
<tr>
<td>
<select class="form-control" style="width: 180px;" id="ddlSample">
<option value="" selected='selected' disabled>-Select Sample-</option>
<option value="sample1">Canvas Example</option>
<option value="sample2">React</option>
<option value="sample3">React Table</option>
<option value="sample4">React Todos</option>
</select>
</td>
<td>
<button class="btn btn-primary ml-2" onclick="myApp.loadSample()">Load</button>
</td>
</tr>
</table>
</div>
</div>
<div id="divLoading" style="text-align: center;margin-top: 50px;">
<i class="fa fa-refresh fa-spin" style="font-size:14px;margin-right:0.5em;"></i>Loading...
</div>
<div id="splitOuter" style="height: 400px;display: flex;margin-left: 10px;margin-right: 10px;opacity: 0;">
<div class="split editorLeft">
<div id="mainEditor" style="height:400px;border:1px solid grey;">
</div>
</div>
<div class="split editorRight">
<div id="divOutput"
style="height: 400px;background-color: white; border:1px solid grey;overflow-y: scroll;">
</div>
</div>
</div>
<div id="divMessage" style="height:20px; margin-bottom: 37px; margin-top: 10px;display: none;" class="container" >
<div class="alert alert-danger" role="alert" rv-html="data.message" rv-if="data.message" style="padding: 5px; text-align: center;"></div>
</div>
<div id="monacoDebug"
style="height: 400px;display: flex;margin-left: 10px;margin-right: 10px;display: none;border:1px solid grey;">
</div>
</body>
<script type="text/javascript">
var rando = Math.floor(Math.random() * Math.floor(100000));
var script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js';
script.setAttribute("data-main", 'config.js?v=' + rando);
document.getElementsByTagName('head')[0].appendChild(script);
</script>
</html>