forked from mehtaanshul/ide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
411 lines (391 loc) · 20.6 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!DOCTYPE html>
<html lang="en">
<head>
<title>Coding Blocks IDE</title>
<!-- Bootstrap -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale=1">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<link href="css/stylesheet.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://codingblocks.com/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all">
<link href="https://codingblocks.com/css/themify-icons.css" rel="stylesheet" type="text/css" media="all"/>
<link href="https://fonts.googleapis.com/css?family=Anonymous+Pro|Droid+Sans+Mono|Inconsolata|Source+Code+Pro|Ubuntu+Mono"
rel="stylesheet">
<script src="scripts/modal.js"></script>
<script src="scripts/custom.js"></script>
<style type="text/css" media="screen" id="editorProp">
#editor {
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 0px;
height: 400px;
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-83327907-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<nav>
<div class="nav-bar">
<div class="module left">
<a href="/">
<div class="vnu"><img class="logo flogo logo-dark" alt="Foundry" src="cblogo.png"></div>
</a>
</div>
<h2 class="vnu">Online IDE</h2>
<div class="module widget-handle mobile-toggle right visible-sm visible-xs">
<i class="ti-menu"></i>
</div>
<div class="module-group right">
<div class="module left">
<ul class="menu">
<li><a href="https://blog.codingblocks.com">Blog</a></li>
<li><a href="https://lab.codingblocks.com">Labs</a></li>
<li><a href="https://bytecast.codingblocks.com/">Podcast</a></li>
<li><a title="Our Locations" href="/contactus">Contact Us</a></li>
<a class="btn btn-white btn-filled btn-lg" href="http://hackerblocks.com">HACKERBLOCKS</a>
</ul>
</div>
</div>
<script>
$('.mobile-toggle').click(function () {
$('.nav-bar').toggleClass('nav-open');
$(this).toggleClass('active');
});
$('.menu li').click(function (e) {
if (!e) e = window.event;
e.stopPropagation();
if ($(this).find('ul').length) {
$(this).toggleClass('toggle-sub');
} else {
$(this).parents('.toggle-sub').removeClass('toggle-sub');
}
});
$('.menu li a').click(function () {
if ($(this).hasClass('inner-link')) {
$(this).closest('.nav-bar').removeClass('nav-open');
}
});
$('.module.widget-handle').click(function () {
$(this).toggleClass('toggle-widget-handle');
});
$('.search-widget-handle .search-form input').click(function (e) {
if (!e) e = window.event;
e.stopPropagation();
});
</script>
</div>
</nav>
<div id="settingModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title text-center">Settings</h4>
</div>
<div class="modal-body">
<div class="modal-group">
<button type="button" class="btn hovercard-light btn-sm btn-modal" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Theme <span class="caret"></span>
</button>
<ul class="dropdown-menu modal-dropdown" style="height: 150px;overflow: auto;">
<li class="text-center"
style="font-size: smaller; background: #f5f5f5;text-transform: uppercase;">Bright
</li>
<li><a class="changetheme" id="dawn" href="#">Dawn</a></li>
<li><a class="changetheme" id="github" href="#">GitHub</a></li>
<li><a class="changetheme" id="solarized_light" href="#">Solarized Light</a></li>
<li><a class="changetheme" id="tomorrow" href="#">Tomorrow</a></li>
<li><a class="changetheme" id="xcode" href="#">Xcode</a></li>
<li class="text-center"
style="font-size: smaller; background: #f5f5f5;text-transform: uppercase;">Dark
</li>
<li><a class="changetheme" id="clouds_midnight" href="#">Clouds Midnight</a></li>
<li><a class="changetheme" id="cobalt" href="#">Cobalt</a></li>
<li><a class="changetheme" id="idle_fingers" href="#">idle Fingers</a></li>
<li><a class="changetheme" id="mono_industrial" href="#">Mono Industrial</a></li>
<li><a class="changetheme" id="monokai" href="#">Monokai</a></li>
<li><a class="changetheme" id="pastel_on_dark" href="#">Pastel on Dark</a></li>
<li><a class="changetheme" id="solarized_dark" href="#">Solarized Dark</a></li>
<li><a class="changetheme" id="tomorrow_night" href="#">Tomorrow Night</a></li>
<li><a class="changetheme" id="twilight" href="#">Twilight</a></li>
</ul>
</div>
<div class="modal-group">
<button type="button" class="btn hovercard-light btn-sm btn-modal" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Font <span class="caret"></span>
</button>
<ul class="dropdown-menu modal-dropdown" style="height: 150px;overflow: auto;">
<li><a onclick="setFont('Anonymous Pro');" href="#">Anonymous Pro</a></li>
<li><a onclick="setFont('Courier');" href="#">Courier</a></li>
<li><a onclick="setFont('Droid Sans Mono');" href="#">Droid Sans Mono</a></li>
<li><a onclick="setFont('Inconsolata');" href="#">Inconsolata</a></li>
<li><a onclick="setFont('Source Code Pro');" href="#">Source Code Pro</a></li>
<li><a onclick="setFont('Ubuntu Mono');" href="#">Ubuntu Mono</a></li>
</ul>
</div>
<div class="modal-group">
<button type="button" class="btn hovercard-light btn-sm btn-modal" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Size <span class="caret"></span>
</button>
<ul class="dropdown-menu modal-dropdown" style="height: 150px;overflow: auto;">
<li><a onclick="setFontSize('9');" href="#">9</a></li>
<li><a onclick="setFontSize('10');" href="#">10</a></li>
<li><a onclick="setFontSize('12');" href="#">12</a></li>
<li><a onclick="setFontSize('14');" href="#">14</a></li>
<li><a onclick="setFontSize('16');" href="#">16</a></li>
<li><a onclick="setFontSize('18');" href="#">18</a></li>
<li><a onclick="setFontSize('20');" href="#">20</a></li>
<li><a onclick="setFontSize('24');" href="#">24</a></li>
<li><a onclick="setFontSize('30');" href="#">30</a></li>
<li><a onclick="setFontSize('36');" href="#">36</a></li>
<li><a onclick="setFontSize('42');" href="#">42</a></li>
<li><a onclick="setFontSize('48');" href="#">48</a></li>
<li><a onclick="setFontSize('56');" href="#">56</a></li>
<li><a onclick="setFontSize('72');" href="#">72</a></li>
</ul>
</div>
<div class="modal-group">
<button type="button" class="btn hovercard-light btn-sm btn-modal" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Auto Save <span class="caret"></span>
</button>
<ul class="dropdown-menu modal-dropdown" style="height: 100%;overflow: auto;">
<li><a onclick="setAutoSave(1);" href="#">ON</a></li>
<li><a onclick="setAutoSave(0);" href="#">OFF</a></li>
</ul>
</div>
<div class="modal-group">
<button id="reset" type="button" class="btn hovercard-light btn-sm btn-modal">
Reset All
</button>
</div>
</div>
</div>
</div>
</div>
<div id="confirmModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content" align="center">
<br>
<h4>Keep the code in the editor?<h4>
<button id="keepChanges" type="button" class="btn hovercard-light btn-sm btn-modal">YES</button>
<button id="discardChanges" type="button" class="btn hovercard-light btn-sm btn-modal">NO</button>
</div>
</div>
</div>
</div>
<div class="container" style="margin-top: 20px;">
<div class="row" style="margin-top: 4%;margin-bottom: 9%;">
<div class="col-md-8 colw90 panelTopOptions">
<textarea id="fileName" class="panelTopTextbox textbox hovercard-light panelTopOptions" rows="1"
style="font-size:16px!important;width: 25%; max-width:100%; margin: 0 5px 0 0!important;resize: none!important;"
placeholder="Enter file name"></textarea>
<div class="btn-group panelTopOptions panelTopButton" style="float: right">
<button type="button" id="downlaod" class="btn hover-light btn-sm btn-filled"
onclick="saveCodeAsFile();">Download
</button>
</div>
<div class="btn-group panelTopOptions panelTopButton" style="float: right;margin-right: 5px;">
<button type="button" id="uploadFile" class=" btn hover-light btn-sm btn-filled">
Upload <span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
</button>
<input type="file" id="upload" style="display:none;">
</div>
</div>
<div class="col-md-8 colw90">
<div class="hovercard" id="fs_control">
<div class="panel panel-default"
style="margin-bottom: 0px; border-radius:0px; border-bottom-width:0px; ">
<div class="headPanel panel-heading" style=" border-bottom-width:0px; ">
<!-- Single button -->
<div class="btn-group">
<button id="panelLang" type="button" class="btn hovercard-light btn-sm btn-filled"
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Language <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a class="lang" id="c" href="#">C</a></li>
<li><a class="lang" id="cpp" href="#">C++</a></li>
<li><a class="lang" id="java" href="#">Java</a></li>
<li><a class="lang" id="py2" href="#">Python</a></li>
<li><a class="lang" id="js" href="#">Javascript</a></li>
</ul>
</div>
<div class="btn-group">
<button type="button" id="settingButton" class="btn hovercard-light btn-sm btn-filled"
onclick="toggleSetting();">
Setting <span class="fa fa-cog"></span>
</button>
</div>
<div class="btn-group">
<button type="button" id="custInp" class="btn hovercard-light btn-sm btn-filled"
onclick="toggleCustInp();">Custom Input
</button>
</div>
<ul class="list-inline panel-actions">
<li><a href="#" id="copyToClip" role="button" title="Copy Code"><i
id="copyBtn" class="glyphicon glyphicon-new-window"></i></a></li>
<li><a href="#" id="panel-fullscreen" role="button" title="Enter Full Screen Mode"><i
id="toggleBtn" class="glyphicon glyphicon-resize-full"></i></a></li>
</ul>
</div>
</div>
<pre id="editor"></pre>
</div>
<p class="autoSaveText">Auto Saved!</p>
</div>
<div class="col-md-4 colw90">
<div id="custInpBox" class="fsHide hide">
<div class="sidecol" id="inputBox">
<div class="panel panel-default hovercard ">
<div class="panel-heading">Input<i onclick="toggleCustInp();" style="margin-top: 5px" class="fa fa-times pull-right"></i></div>
<div class="panel-body">
<textarea class="textbox" id="test-input" rows="2"
style="width: 100%; max-width:100%;"
placeholder="Enter your custom inputs"></textarea>
</div>
</div>
</div>
</div>
<div class="row fsHide">
<div class="col-md-12 buttonCenter">
<button id="submit" type="button" class="btn btn-sm hover-light btn-filled"
data-loading-text="<i class='fa fa-circle-o-notch fa-spin'></i> Running">Run
</button>
<button type="button" id="save" class="btn hover-light btn-sm btn-filled"
onclick="saveCode();">Save
</button>
<button id="clear" type="button" class="btn bg-dark hover-light btn-sm">Clear All</button>
</div>
</div>
<div class="row top-buffer fsHide">
<div class="col-md-12">
<div class="hovercard">
<div class="panel panel-default">
<div class="panel-heading">Output</div>
<div class="panel-body">
<pre id="output"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- FOOTER -->
<footer class="footer-1 bg-dark fsHide">
<div class="container">
<div class="row" style="margin-top:30px;">
<div class="col-md-3 fcol">
<div class="vnu"><img alt="Logo" class="logo flogo"
src="https://codingblocks.com/img/cb/cb_tshirt_logo.png">
</div>
</div>
<div class="col-md-3 fcol">
<span style="color:#fff;font-weight:500;font-size:18px;text-transform:uppercase;">About Us</span>
<p style="color:#fff;font-weight:600;">India's best programming and software training institute offers
courses in Java, C++, Android, NodeJS and more.</p>
</div>
<div class="col-md-3 fcol">
<ul>
<li style="color:#fff;font-weight:500;font-size:18px;text-transform:uppercase;">Resources</li>
<li><a href="https://blog.codingblocks.com/">Blog</a></li>
<li><a href="https://lab.codingblocks.com/">Labs</a></li>
<li><a href="https://bytecast.codingblocks.com/">Podcast</a></li>
<li><a title="Our Locations" href="/contactus">Contact Us</a></li>
</ul>
</div>
<div class="col-md-3 fcol">
<span style="color:#fff;font-weight:500;font-size:18px;text-transform:uppercase;">Address</span>
<p style="color:#fff;font-weight:600;">47, Nishant Kunj, 1st & 2nd Floor, Pitampura Main Road, Opposite
Metro Pillar 337, Pitampura, Delhi, 110034</p>
</div>
</div>
<div class="row" style="margin-bottom:30px;">
<div class="col-sm-6">
<span class="sub">© Copyright 2016 - Coding Blocks Pvt. Ltd.</span>
<br>
<a href="/privacypolicy.html">Privacy Policy</a> ||
<a href="/tos.html"> Terms of Service</a>
</div>
<div class="col-sm-6 text-right">
<ul class="list-inline social-list">
<li>
<a href="http://twitter.com/codingblocksIN" target="_self">
<i class="fa fa-twitter fa-2x"></i>
</a>
</li>
<li>
<a href="http://fb.me/codingblocksindia" target="_self">
<i class="fa fa-facebook fa-2x"></i>
</a>
</li>
<li>
<a href="https://www.linkedin.com/company/coding-blocks" target="_self">
<i class="fa fa-linkedin fa-2x"></i>
</a>
</li>
<li>
<a href="https://www.youtube.com/channel/UCICWIYEx2mo4wYZzLwJ7wVw" target="_self">
<i class="fa fa-youtube-play fa-2x"></i>
</a>
</li>
<li class="vpf">
<a href="http://github.com/coding-blocks" target="_self">
<i class="fa fa-github fa-2x"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="row" style="margin-bottom:30px;">
<a class="btn btn-sm fade-half back-to-top inner-link" style="color:#fff;" href="#top">Top</a>
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="./scripts/ext-language_tools.js"></script>
<script src="./scripts/c_cpp.js"></script>
<script src="./scripts/python.js"></script>
<script src="./scripts/java.js"></script>
<script src="./scripts/javascript.js"></script>
<script>
ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.getSession().setMode("ace/mode/c_cpp");
editor.setTheme("ace/theme/dawn");
editor.$blockScrolling = Infinity;
editor.getSession().on('change', function () {
changes = 1;
});
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true,
wrap: true
});
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="scripts/sample-source.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>