hy/demo/templates/base.html
2012-12-26 22:37:57 -05:00

114 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %} | hy</title>
<link rel="stylesheet" href = "{{ url_for('static', filename='css/debuild.css') }}" ></link>
<script src = '{{ url_for('static', filename='jquery.min.js') }}' ></script>
<script type="text/javascript">
function reload() {
var input = $("#repl-input").val();
console.log("Input: " + input);
$('#repl-output').load(
'/translate',
{"code": input}
);
}
$(document).ready(function() {
$("#repl-input").keyup(function(e) {
reload();
});
reload();
});
</script>
</head>
<body>
<div class = 'popover' >
<div class = 'focus' >
<div class = 'repl' >
<textarea id = 'repl-input' class = 'repl-left repl-pane' >
(import "os")
(print (os.path.abspath "."))
; something like /home/tag
(defn square [x]
(* x x))
(defn factorial (n)
(if (&lt;= n 1)
1
(* n (factorial (- n 1)))))
(defn fib (n)
(if (&lt; n 2)
n
(+ (fib (- n 1)) (fib (- n 2)))))
(print (fib 2))
; 1
(print "4! =" (factorial 4))
; 4! = 24
</textarea>
<pre id = 'repl-output' class = 'repl-right repl-pane' ></pre>
</div>
</div>
</div>
<div class = 'headblock' >
<div class = 'spacer' ></div>
</div>
<div class = 'headblock' >
<div class = 'banner' >
<ul>
<li><a href = '#' >Home</a></li>
<li><a href = '#' >Try it</a></li>
<li><a href = '#' >Source</a></li>
</ul>
</div>
</div>
<div class = 'content' >
<div class = 'main-container' ><div class = 'shim' >
{% block content %}
{% endblock %}
</div></div>
</div>
<div class = 'footer' >
<div class = 'container' ><div class = 'shim' >
<div class = 'fifth' >
<h1><i class="icon-sitemap"></i> Links</h1>
<ul>
</ul>
</div>
<div class = 'fifth' >
<h1><i class="icon-link"></i> Examples</h1>
<ul>
</ul>
</div>
<div class = 'fifth' >
<h1><i class="icon-group"></i> About</h1>
<ul>
<li><a href = 'http://pault.ag/' >Paul's Homepage</a></li>
</ul>
</div>
<div class = 'fifth' >
<h1><i class="icon-info-sign"></i> Help</h1>
<ul>
</ul>
</div>
<div class = 'fifth' >
<h1><i class="icon-github"></i> Source Code</i></h1>
<ul>
</ul>
</div>
</div></div>
</div>
</body>
</html>