-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathindex.html
More file actions
96 lines (85 loc) · 2.29 KB
/
index.html
File metadata and controls
96 lines (85 loc) · 2.29 KB
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
<html>
<head>
</head>
<style type="text/css">
html {
font-family: Helvetica;
border:0px none;
padding: 0px;
}
a {
padding: 5px;
}
.pad {
padding: 5px;
}
.para {
width:50%; min-width: 400px; max-width: 600px;
padding:5px;
}
</style>
<body>
<h1>Spacebrew Examples</h1>
<div class="para">
Hosted library links:<br/>
<a href="library/sb-1.4.2.js">Library: sp-1.4.2.js</a>
<a href="library/sb-1.4.2.min.js">Minified: sb-1.4.2.min.js</a>
<a href="library/sb-admin-0.1.5.js">Admin mix-in: sb-admin-0.1.5.js</a>
</div>
<div class="para">
Please remember to give your client a unique name. You can click one of the following links and add your unique name after the "name=" in the query string and press enter to re-load the page with your unique name.
</div>
<div id="ex_b">
<h2>Basic Examples</h2>
</div>
<div id="ex_a">
<h2>Advanced Examples</h2>
</div>
<script type="text/javascript">
var examples_basic = [
"spacebrew_button",
"spacebrew_slider",
"spacebrew_string",
"spacebrew_image",
"spacebrew_piano",
"spacebrew_shared_canvas",
"spacebrew_synth",
"spacebrew_xypad",
"spacebrew_youtube",
];
var examples_advanced = [
"spacebrew_admin",
"spacebrew_binary_image",
"spacebrew_custom",
];
var p_bas = document.getElementById("ex_b");
var p_adv = document.getElementById("ex_a");
createElements( examples_basic, p_bas );
createElements( examples_advanced, p_adv );
var alt = false;
function createElements( array, parent ){
for ( var i=0; i<array.length; i++){
var n = array[i];
var div = document.createElement("div");
div.id = n +"_div";
parent.appendChild(div);
div.className = "pad";
div.innerHTML = "<strong>Example: " + n +"</strong>";
div.appendChild( createLink(n, "local", "localhost") );
div.appendChild( createLink(n, "cloud", "sandbox.spacebrew.cc") );
if ( alt ){
div.style.backgroundColor = "#eee";
}
alt = !alt;
}
}
function createLink(type, text, server) {
var a = document.createElement("a");
a.href = type + "/index.html?name=";
if ( server != "" && server != undefined ) a.href += "&server=" + server;
a.innerHTML = text;
return a;
}
</script>
</body>
</html>