-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
81 lines (68 loc) · 2.1 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
<html>
<head>
<title>tet</title>
<style type="text/css" media="screen">
#editor {
border-radius: 5px;
font-size: 15px;
width: 100%;
height: 90%;
}
.editor-div {
flex-grow: 1;
width: 100px;
max-width: 700px;
}
#canvas {
border-radius: 5px;
}
.flexbox {
display: flex;
gap: 20px 20px;
background-color: #cacaca;
padding: 20px;
border-radius: 10px;
}
button {
margin-top: 10px;
padding: 10px 20px 10px 20px
}
</style>
</head>
<body>
<script src="skulpt/skulpt.min.js" type="text/javascript"></script>
<script src="skulpt/skulpt-stdlib.js" type="text/javascript"></script>
<div class="flexbox">
<div class="editor-div">
<script type="text/javascript" src="skulpt.js"></script>
<div id="editor">pupu=Bunny(0, 0)
kissa=Cat(5, 5)
pupu.move("right")
pupu.say("something")
for i in range(10):
pupu.move("down")
pupu.move("right")
kissa.move("left")</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.14/ace.js" type="text/javascript"
charset="utf-8">
</script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/dawn");
editor.session.setMode("ace/mode/python");
editor.setOptions({
autoScrollEditorIntoView: true,
copyWithEmptySelection: true,
});
</script>
<div>
<button type=button onclick="reset(); runit()">Suorita</button>
<button type=button onclick="path=[]">Pyyhi</button>
<button type=button onclick="cmds=[]">Pysäytä</button>
</div>
</div>
<canvas id=canvas width=800 height=600 style="background: url('images/bg.png')"></canvas>
<script src="canvas.js"></script>
</div>
</body>
</html>