-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
99 lines (89 loc) · 3.13 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
<!doctype html>
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="initial-scale = 1.0, user-scalable=no, width=device-width">
<title>BonsaiJS - Orbit</title>
<link href="css/style.css" rel="stylesheet" />
<style>
#cheatsheet p {
font-size: 10px;
}
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33447088-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="vbox">
<div id="head" class="hbox">
<ul class="nav left">
<li class="icon-medium orbit"><a href="/">Orbit</a></li>
<li class="icon-medium files" title="Show/Hide Directory">Files</li>
</ul>
<ul class="nav right">
<li class="icon-medium keyboard" title="Show/Hide Cheatsheet">Cheatsheet</li>
</ul>
</div>
<ul id="viewNavigation">
<li class="icon-medium new" title="New File">New</li>
<li class="icon-medium refresh" title="Refresh">Refresh stage</li>
</ul>
<div id="container">
<div id="editorContainer">
<div id="editorNode"></div>
</div>
<div id="playerNode"></div>
<div id="cheatsheet">
<div id="cheatsheet-content">
</div>
</div>
</div>
<form class="play-pause-button">
<input type="checkbox" checked id="play-pause">
<label for="play-pause" title="Play/Pause" class="button"></label>
</form>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.8.0/lodash.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bonsai/0.4/bonsai.min.js"></script>
<script src="js/orbit/orbit.min.js"></script>
<script src="js/ace/ace.js"></script>
<script>
require(['js/orbit'], function(Orbit) {
// parse url query string
var urlQueryString = Object.create(null);
location.search.slice(1).split('&').forEach(function(pair) {
pair = pair.split('=');
if (pair.length === 2) {
urlQueryString[pair[0]] = pair[1];
}
});
var editorOptions = {
elementId: 'editorNode',
cheatSheetUrl: './cheatsheet.md'
};
var playerOptions = {
elementId: 'playerNode',
bonsai: bonsai,
baseUrl: urlQueryString.base || 'movies/',
submovieLoaderUrl: 'submovie_loader.js',
exampleBackendOptions: {
baseUrl: 'movies'
},
bonsaiOptions: {}
};
window.orbit = new Orbit(editorOptions, playerOptions);
window.updateEditor = function(source){
orbit.editor.load(source);
}
});
</script>
</body>