Updated Street Address
[openhouseparty.online/.git] / build / lib / flaskr / templates / blog / index.html
1 {% extends 'base.html' %}
2
3 {% block header %}
4   <h1>{% block title %}Posts{% endblock %}</h1>
5   {% if g.user %}
6     <a class="action" href="{{ url_for('blog.create') }}">New</a>
7   {% endif %}
8 {% endblock %}
9
10 {% block content %}
11   {% for post in posts %}
12     <article class="post">
13       <header>
14         <div>
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>
17         </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>
20         {% endif %}
21       </header>
22       {% if post['post_images'] != None %}
23         <img src="{{url_for('blog.send_uploaded_file', filename=post['post_images']) }}" width="25%" height="25%"/>
24       {% endif %}
25       <p class="body">{{ post['post_shortbody'] }}</p>
26     </article>
27     {% if not loop.last %}
28       <hr>
29     {% endif %}
30   {% endfor %}
31 {% endblock %}