-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (73 loc) · 2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>LilCoders Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
height: 100%;
width: 100%;
}
#editor {
height: 350px;
width: 350px;
position: relative;
}
#player {
position: relative;
}
.buttons {
text-decoration: none;
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
</head>
<body>
<noscript>
Oh Noes! Your browser does not support LilCoders. :(
</noscript>
<div class="container">
<div class="row">
<div class="six columns">
<pre id="editor">
function draw() {
//draw 25 times a second
}</pre>
</div>
<div class="six columns">
<canvas id="player" style="border:1px solid #000000;" height="300" width="300">Oh Noes! Your browser does not support LilCoders. :(</canvas>
<br>
<a href="#" class="buttons">
<img src="img/Play.png" alt="Play" width=48 height=48 id="Play" onclick="runCode()" />
</a>
<a href="#" class="buttons">
<img src="img/Stop.png" alt="Stop" width=48 height=48 id="Stop" onclick="clearInterval(code);" />
</a>
<a href="#" class="buttons">
<img src="img/Save.png" alt="Save" width=48 height=48 id="Save" onclick='localStorage.setItem("code", editor.getValue())'/>
</a>
<a href="#" class="buttons">
<img src="img/upload.png" alt="upload" width=48 height=48 id="upload" onclick="editor.setValue(localStorage.code, 1);"/>
</a>
</div>
</div>
</div>
<script src="./base.js" type="text/javascript" charset="utf-8"></script>
<script src="./src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="./src-noconflict/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
<script>
var langTools = ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.setTheme("ace/theme/clouds");
editor.session.setMode("ace/mode/javascript");
editor.setShowPrintMargin(false);
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true
});
</script>
</body>
</html>