Files
twitterboard/twiderboard/templates/index.html
Julien Lengrand-Lambert 2e8a425cb7 Structures the html templates a bit more and adds categories in the page.
NExt steps:
- List all currently tracked hashtags on main page
- Add icon to remove those hashtags next to them.
2013-02-17 18:15:48 +01:00

35 lines
840 B
HTML

{% extends "layout.html" %}
{% block restbody %}
<script type=text/javascript>
$(function() {
var submit_form = function(e) {
$.getJSON($SCRIPT_ROOT + '/_add_hashtag', {
new_hash: $('input[name="new_hash"]').val()
}, function(data) {
$('#hash').text(data.hash);
$('input[name=new_hash]').focus().select();
});
return false;
};
$('a#calculate').bind('click', submit_form);
$('input[type=text]').bind('keydown', function(e) {
if (e.keyCode == 13) {
submit_form(e);
}
});
$('input[name=new_hash]').focus();
});
</script>
<h1>Current Hashtags</h1>
{% include "trendy.html" %}
<h1>Add new Hashtag</h1>
<p>
<input type=text size=5 name='new_hash'>
<span id='hash'></span>
</br>
<a href=# id='calculate'>Add hashtag!</a>
</p>
{% endblock %}