-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.tmpl
101 lines (92 loc) · 3.96 KB
/
index.html.tmpl
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>papert: logo in your browser</title>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/static/papert.css" />
<script type="text/javascript" src="/static/turtle.js"></script>
<script type="text/javascript" src="/static/parser.js"></script>
<script type="text/javascript" src="/static/logo.js"></script>
<script type="text/javascript" src="/static/init.js"></script>
</head>
<body onload="init('canvas','turtle','input','oldcode', 'textOutput'); clearcanvas(); run(1,false);">
<div id="main">
<form id="input" action="/" method="post" onSubmit="this.img.value = canvas.toDataURL().replace('data:image/png;base64,','')">
<div id="top"><div class="inner"><h1>papert―logo in your browser</h1>
<h2>
examples:
<a href="/_REo_2F2">koch snowflake</a>,
<a href="/dZ1f62XY">hilbert curve</a>,
<a href="/8kpcBaQu">spiral</a>
</h2>
{% if hash %}
<h4>share this program: <a href="http://logo.twentygototen.org/{{hash|escape}}">link to it</a><br />
html: <input readonly="readonly" id="htmlsnippet" value="<a href="http://logo.twentygototen.org/{{hash|escape}}"><img src="http://logo.twentygototen.org/{{hash}}.png"/><br/>Run at logo.twentygototen.org</a>" /><br />
bbcode: <input readonly="readonly" id="bbcode" value="[url=http://logo.twentygototen.org/{{hash}}][img]http://logo.twentygototen.org/{{hash}}.png[/img]Run at logo.twentygototen.org[/url]" />
</h4>
{% endif %}
</div></div>
<div id="content">
<div class="inner">
<div id="oldcode"> </div>
<div>
<textarea name="code" id="code" rows="80" cols="20">{{code|escape}}</textarea>
</div>
<div style="margin: 5px;">
<input type="button" onClick="run(25,true);" value="run slowly" />
<input type="button" onClick="run(5,false);" value="run normally" style="font-weight: bold;"/>
<input type="button" onClick="run(1,false);" value="run fast" />
<input type="button" onClick="stop();" value="stop program" />
<input type="hidden" name="img" />
</div>
</div>
</div>
<div id="left">
<div class="inner">
<div id="textOutput"></div>
<div id="turtle">
<embed width="20" height="20" id='sprite' src="/static/turtle.svg"/>
</div>
<canvas id="canvas" width="500" height="500">
Your browser doesn't support canvas tags. Please upgrade to a recent version of Firefox or Opera.
</canvas>
<span style="float: left; margin-right: auto;">
<input type="submit" value="share this program" />
<input type="button" onClick="document.location.href = canvas.toDataURL().replace('image/png', 'image/octet-stream')" value="save as png" />
</span>
<span style="float: right;margin-left: auto; margin-right: 20px;">
<input type="button" onClick="clearcanvas();" value="clear" />
</span>
</div>
</div>
</form>
<div id="footer">
<span style="float: left; margin-left: 20px; margin-right: auto; color: white;">
Recent Programs
</span>
<span style="float: right;margin-left: auto; margin-right: 20px; color: white;">
this is free software, and
<a href="http://code.google.com/p/papert">papert is hosted on google code</a>
</span>
</div>
<div id="recent">
<a name="recent"></a>
<ul>
{% if next_date %}
<li><a href="?newer={{next_date|escape}}#recent"><</li>
{% endif %}
{% for item in recent %}
<li><a href="/{{item}}{% if older %}?older={{older|escape}}{% endif %}{% if newer %}?newer={{newer|escape}}{% endif %}"><img src="/{{item}}.png" height="125" width="125" alt="" /></a></li>
{% endfor %}
{% if last_date %}
<li><a href="?older={{last_date|escape}}#recent">></a></li>
{% endif %}
</ul>
</div>
<iframe id="notes" src="static/help.txt"/>
</div>
</body>
</html>