1 {% extends 'base.html' %}
4 <h1>{% block title %}Posts{% endblock %}</h1>
6 <a class="action" href="{{ url_for('blog.create') }}">New</a>
11 {% for post in posts %}
12 <article class="post">
15 <h1><a class="action" href="{{ url_for('blog.view', id=post['post_id']) }}">{{ post['post_title'] }}</a></h1>
16 <div class="about">by {{ post['xuser_username'] }} on {{ post['post_created'].strftime('%Y-%m-%d') }}</div>
18 {% if g.user['xuser_id'] == post['post_author_id'] %}
19 <a class="action" href="{{ url_for('blog.update', id=post['post_id']) }}">Edit</a>
22 {% if post['post_images'] != None %}
23 <img src="{{url_for('blog.send_uploaded_file', filename=post['post_images']) }}" width="25%" height="25%"/>
25 <p class="body">{{ post['post_shortbody'] }}</p>
27 {% if not loop.last %}