hy/demo/templates/base.html

65 lines
1.7 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %} | hy</title>
2012-12-27 05:08:09 +01:00
<link rel = "stylesheet" href = "{{ url_for('static', filename='css/debuild.css') }}" ></link>
2012-12-27 04:37:57 +01:00
<script src = '{{ url_for('static', filename='jquery.min.js') }}' ></script>
2012-12-27 05:08:09 +01:00
<script type="text/javascript">
2012-12-28 02:17:33 +01:00
function reload() {
var input = $("#repl-input").val();
console.log("Input: " + input);
$('#repl-output').load(
'/translate',
{"code": input}
);
}
$(document).ready(function() {
2012-12-28 04:28:06 +01:00
var count = 0;
2012-12-28 02:17:33 +01:00
$("#repl-input").keyup(function(e) {
2012-12-28 04:28:06 +01:00
var curcount;
count = count + 1;
curcount = count;
window.setTimeout(
function() {
if ( curcount == count ) {
reload();
} else {
/* Pass. User is still typing */
}
},
500
);
2012-12-28 02:17:33 +01:00
});
reload();
2012-12-27 04:37:57 +01:00
});
2012-12-27 05:08:09 +01:00
</script>
</head>
<body>
2012-12-28 02:17:33 +01:00
<div id = 'popshim' >
<div class = 'popover' >
<div class = 'focus' >
<div class = 'repl' >
2012-12-28 04:15:00 +01:00
<textarea id = 'repl-input' class = 'repl-pane repl-left' >
2012-12-28 02:17:33 +01:00
(defn square [x]
(* x x))
2012-12-28 04:15:00 +01:00
(print (square 4))
2012-12-28 02:17:33 +01:00
</textarea>
2012-12-28 04:15:00 +01:00
<pre
id = 'repl-output'
class = 'repl-pane repl-right'
></pre>
2012-12-28 02:17:33 +01:00
</div>
</div>
</div>
</div>
2012-12-28 04:15:00 +01:00
<div class = 'logo' >
<img src = '{{ url_for('static', filename='imgs/logo.png') }}' alt = 'hython' />
</div>
{% block content %}
{% endblock %}
</body>
</html>