This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
1 |
<!doctype html> |
2 |
<head> |
3 |
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='bootstrap.min.css') }}"> |
4 |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> |
5 |
<script type="text/javascript"> |
6 |
function deletePost(post_id){ |
7 |
if(confirm("Do you really want to delete this post?")) |
8 |
$.post('/posts/delete/',{'post_id':post_id},function(){alert("The post has been deleted!!")}); |
9 |
} |
10 |
</script> |
11 |
</head> |
12 |
<body> |
13 |
<ul class=entries> |
14 |
{% for entry in entries %} |
15 |
<li><h2>{{ entry.title }}</h2>@<b>{{entry.user}}</b> <a href=""><i class="icon-trash" onclick=deletePost({{ entry.id|string|tojson|safe }});></i></a> |
16 |
<p> {{ entry.text|safe }} </p> |
17 |
{% endfor %} |
18 |
</ul> |
19 |
</body> |