-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
217 lines (200 loc) · 13.7 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<html>
<head>
<link type="text/css" rel="stylesheet" href="node_modules/golden-layout/src/css/goldenlayout-base.css" />
<link type="text/css" rel="stylesheet" href="node_modules/golden-layout/src/css/goldenlayout-dark-theme.css" />
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="node_modules/bootswatch/dist/darkly/bootstrap.css" />
<script>
if (location.href.startsWith("http://ide.onelang.io/") && !location.href.includes("server=http://"))
location.href = location.href.replace(/^http:/, "https:");
</script>
<script src="node_modules/bowser/bundled.js"></script>
<script src="node_modules/yamljs/dist/yaml.min.js"></script>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script>
((window.gitter = {}).chat = {}).options = { room: "onelang-io/Lobby", activationElement: false };
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
<style>
html, body { height: 100%; margin: 0; overflow: hidden; display: flex; flex-flow: column; }
.editorDiv { height:100%; display: flex; min-height: 100%; flex-direction: column; }
.editorDiv .aceEditor { flex: 1; }
.editorDiv .statusBar { color: white; height: 17px; margin: 2px 4px 0px 4px; font-family: arial; font-size: 13px; }
span.label { padding: 1px 4px; border-radius: 5px; font-size: 11px; font-weight: bold; margin-right:3px; }
span.label.success { background: #0a0; }
span.label.error { background: #c00; }
span.label.warning { background: #ab7d12; }
span.label.waiting { background: #aaa; }
span.label.note { background: #666; }
span.result { position: relative; top: 1px; }
.ace-monokai .ace_marker-layer .ace_step_multiline { background: rgba(102, 82, 0, 0.2); position: absolute; z-index: 3; }
.compilerMissing { color: white; margin-left: 2px; }
.btn { padding: 5px 10px; }
.modal { color: white; }
.control-label { margin-bottom:8px }
.form-control { padding: 6px 12px; height:34px }
.modal-footer, .modal-body { padding: 15px }
.input-group-addon { padding: 8px 8px }
form { padding: 0; margin: 0 }
#noscript, #unsupportedBrowser { color: black; background: #ffee00; z-index:10000; position:fixed; left:0; right:0; padding:10px; text-align:center }
#noscript a, #unsupportedBrowser a { color: black; text-decoration: underline }
#unsupportedBrowser .closeBtn { float:right; margin-top: 1px; cursor: pointer }
#topPanel { color: white; background: linear-gradient(to right, red, #480000); z-index:10000; position: relative; box-shadow: 0px 0px 5px black; }
#topPanel .left { padding:5px; }
#topPanel .logo { display:inline-block; padding:6px 4px 2px 6px; }
#topPanel select { color: black }
#topPanel a { color: white }
#topPanel .right { float:right; top: 10px; right: 5px; position: relative }
#topPanel .github { background-image: linear-gradient(to bottom, #fafbfc, #e4ebf0); background-repeat: repeat-x; background-size: 110% 110%;
height: 23px; padding: 3px 6px; font-size: 11px; color: #24292e; top: 0px; position: relative;
display: inline-block; font-weight: 600; cursor: pointer; border: 1px solid #d1d2d3; border-radius: 0.25em; margin-left:5px; margin-right:2px }
#topPanel .right a:hover, #topPanel .right a:focus, #topPanel .right a:active { text-decoration: none }
#topPanel .github:hover { background-color: #e6ebf1; background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%); background-position: -.5em; border-color: rgba(27,31,35,0.35); }
#topPanel .github span { position: relative; top: -2px; margin-left: 1px; }
#follow-button { position: relative; padding: 3px 8px 2px 6px; background-color: #1b95e0; color: #fff; border-radius: 3px; cursor: pointer; margin-left:4px }
#follow-button i { position: relative; top: 1px; display: inline-block; width: 14px; height: 14px; background: transparent 0 0 no-repeat;
background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2072%2072%22%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h72v72H0z%22%2F%3E%3Cpath%20class%3D%22icon%22%20fill%3D%22%23fff%22%20d%3D%22M68.812%2015.14c-2.348%201.04-4.87%201.744-7.52%202.06%202.704-1.62%204.78-4.186%205.757-7.243-2.53%201.5-5.33%202.592-8.314%203.176C56.35%2010.59%2052.948%209%2049.182%209c-7.23%200-13.092%205.86-13.092%2013.093%200%201.026.118%202.02.338%202.98C25.543%2024.527%2015.9%2019.318%209.44%2011.396c-1.125%201.936-1.77%204.184-1.77%206.58%200%204.543%202.312%208.552%205.824%2010.9-2.146-.07-4.165-.658-5.93-1.64-.002.056-.002.11-.002.163%200%206.345%204.513%2011.638%2010.504%2012.84-1.1.298-2.256.457-3.45.457-.845%200-1.666-.078-2.464-.23%201.667%205.2%206.5%208.985%2012.23%209.09-4.482%203.51-10.13%205.605-16.26%205.605-1.055%200-2.096-.06-3.122-.184%205.794%203.717%2012.676%205.882%2020.067%205.882%2024.083%200%2037.25-19.95%2037.25-37.25%200-.565-.013-1.133-.038-1.693%202.558-1.847%204.778-4.15%206.532-6.774z%22%2F%3E%3C%2Fsvg%3E); }
#follow-button span { font-weight: bold; font-size:12px; position: relative; top: -2px; margin-left: 3px }
#follow-button:hover { background-color: #0c7abf; }
#toggleGitter { background-color: #753a88; }
#toggleGitter:hover { background-color: #633273; }
.gitter-chat-embed { margin-top: 42px; }
.gitter-chat-embed-action-bar { left: unset; padding-left: 20px }
#patreon-button { position: relative; top: -2px; margin-left: 8px; }
#patreon-button:hover { background-color:#000; opacity:0.9; }
#welcomeModalLabel { text-align:center }
</style>
</head>
<body>
<div id="unsupportedBrowser">
Your browser is not supported. Features may or may not working. <a href="http://outdatedbrowser.com/" target="_blank">Please use the latest Chrome or Firefox.</a>
<i class="closeBtn glyphicon glyphicon-remove"></i>
</div>
<noscript>
<div id="noscript">This app requires Javascript to work. <a href="http://enable-javascript.com/" target="_blank">Learn how to enable Javascript.</a></div>
</noscript>
<div id="loading" style="text-align: center; position: absolute; left:0; right:0; margin-top: 100px">
<div style="font-size: 72px">loading...</div>
<div style="font-size: 14px; margin-top: 5px">...this may take a few seconds...</div>
</div>
<div id="topPanel">
<div class="logo">
<img src="images/webide_top_logo_68px.png" height="34" width="131" />
</div>
<span class="left">
<span style="font-weight: bold">Demo:</span>
<select id="demoSelect" style="margin-left: 5px">
<option disabled selected value>(quick jump to a demo)</option>
<option value="?input=Test">Generic features</option>
<option value="?input=MultiLangTest&layout=**ts,*cs|*php,*ruby">Cross-language editing</option>
<option value="?input=ReflectionTest">Reflection</option>
<option value="?input=CustomDecoder">Decoder example (inheritance)</option>
<option value="?input=BigInteger">Big integer example</option>
<option value="?input=InheritanceTest">Inheritance</option>
<option value="?input=JsonParseTest">JSON handling</option>
<option value="?input=HelloWorldRaw">Hello world</option>
</select>
<script>
$("#demoSelect").on("change", function() { location.href = this.value; });
Array.from($("#demoSelect option")).find(x => x.value === location.search).selected = true;
</script>
<a href="https://github.com/koczkatamas/onelang/wiki/FAQ" target="_blank" style="margin-left:5px">Please read the FAQ!</a>
<span style="margin:0 5px">|</span>
<a href="https://youtu.be/Rwo6KJ_Pa9Q" target="_blank">Watch the demo video</a>
</span>
<div class="right">
<a id="toggleGitter" class="js-gitter-toggle-chat-button" href="#" style="padding: 4px 6px 4px 9px; border-radius: 3px; color: white; font-size: 13px; position: relative; top: -1px;">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 25" style="fill:white; height:14px; position:relative; top:2px; stroke:white; width:11px">
<rect x="15" y="5" width="2" height="10"></rect>
<rect x="10" y="5" width="2" height="20"></rect>
<rect x="5" y="5" width="2" height="20"></rect>
<rect width="2" height="15"></rect>
</svg> <span style="margin-left:3px; position:relative; top:-1px; font-weight:bold">open chat</span>
</a>
<a id="patreon-button" href="https://www.patreon.com/onelang" target="_blank"><img src="images/patreonbutton3.png" /></a>
<a id="follow-button" title="Twitter: @koczkatamas" href="https://twitter.com/koczkatamas" target="_blank"><i></i><span>koczkatamas</span></a>
<a class="github" href="https://github.com/koczkatamas/onelang" target="_blank">
<svg version="1.1" width="14" height="14" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg> <span>Github</span>
</a>
</div>
</div>
<script src="node_modules/requirejs/require.js"></script>
<script>
// unsupported browser
if (bowser.getParser(navigator.userAgent).satisfies({ chrome: ">=55", firefox: ">=52", safari: ">=10.1", opera: ">=50" }))
document.getElementById("unsupportedBrowser").style.display = "none";
document.querySelector("#unsupportedBrowser .closeBtn").addEventListener("click",
() => document.getElementById("unsupportedBrowser").style.display = "none");
window.global = window;
requirejs.config({
packages: [{
name: 'onelang',
location: '/node_modules/onelang/lib',
main: 'index'
}],
baseUrl: 'js/',
paths: {
"golden-layout": "/node_modules/golden-layout/dist/goldenlayout",
"jquery": "/node_modules/jquery/dist/jquery",
"js-yaml": "/node_modules/onelang/node_modules/js-yaml/dist/js-yaml",
"ace": "/node_modules/ace-builds/src"
}
});
require(["ace/ace", "Browser"]);
</script>
<div class="modal fade" id="authTokenModal" tabindex="-1" role="dialog" aria-labelledby="authTokenModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="authTokenModalLabel">Compiler backend requires authentication</h4>
</div>
<form>
<div class="modal-body">
<div class="form-group">
<label for="authToken" class="control-label">Authentication token:</label>
<input type="text" class="form-control" id="authToken">
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" data-dismiss="modal">Authenticate</button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="welcomeModal" tabindex="-1" role="dialog" aria-labelledby="welcomeModalLabel" style="margin-top: 50px;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="form-group">
<h4 class="modal-title" id="welcomeModalLabel">Hey there!</h4>
</div>
<div class="form-group">
If this is the first time you are using Onelang WebIDE then I recommend watching our
<a href="https://youtu.be/Rwo6KJ_Pa9Q" target="_blank">Demo video</a>:
<iframe width="568" height="320" src="//www.youtube.com/embed/Rwo6KJ_Pa9Q" frameborder="0" allowfullscreen style="margin-top:10px"></iframe>
</div>
<div class="form-group">
We would be pleased if you could visit us and share your thoughts about Onelang in our
<a href="https://gitter.im/onelang-io/Lobby" target="_blank">Gitter chatroom</a>.
</div>
<div class="form-group">
You can view the source code or create issues <a href="https://github.com/koczkatamas/onelang" target="_blank">on Github</a>.
</div>
<div style="text-align:center; font-size:12px; margin-bottom:10px">
<a id="welcomeDoNotShowAgain" href="#" data-dismiss="modal">close and do not show again</a>
</div>
<div style="text-align:center">
<button type="submit" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<div id="goldenLayout" style="height:100%; width:100%">
</div>
</body>
</html>