hy/demo/templates/base.html
2012-12-27 22:28:06 -05:00

65 lines
1.7 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() {
var count = 0;
$("#repl-input").keyup(function(e) {
var curcount;
count = count + 1;
curcount = count;
window.setTimeout(
function() {
if ( curcount == count ) {
reload();
} else {
/* Pass. User is still typing */
}
},
500
);
});
reload();
});
</script>
</head>
<body>
<div id = 'popshim' >
<div class = 'popover' >
<div class = 'focus' >
<div class = 'repl' >
<textarea id = 'repl-input' class = 'repl-pane repl-left' >
(defn square [x]
(* x x))
(print (square 4))
</textarea>
<pre
id = 'repl-output'
class = 'repl-pane repl-right'
></pre>
</div>
</div>
</div>
</div>
<div class = 'logo' >
<img src = '{{ url_for('static', filename='imgs/logo.png') }}' alt = 'hython' />
</div>
{% block content %}
{% endblock %}
</body>
</html>