2020-08-10 23:58:39 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="container" style="text-align:center;">
|
|
|
|
|
|
|
|
<div class="title">
|
|
|
|
<h3>{% block title %}Top Posts{% endblock %}</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if posts %}
|
2020-09-16 20:31:27 +01:00
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th>Date</th>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Title</th>
|
|
|
|
<th>Submitter</th>
|
|
|
|
<th>Amount</th>
|
|
|
|
</tr>
|
2020-08-27 05:47:14 +01:00
|
|
|
{% for post in posts %}
|
2020-09-16 20:31:27 +01:00
|
|
|
<tr>
|
|
|
|
<td>{{ post[1].timestamp.strftime('%Y-%m-%d %H:%M') }}</td>
|
|
|
|
<td>{{ post[1].id }}</td>
|
2020-09-16 22:20:02 +01:00
|
|
|
<td><a href="{{ url_for('post.read', id=post[1].id) }}">{{ post[1].title }}</a></td>
|
2020-09-16 20:31:27 +01:00
|
|
|
<td>{{ post[1].submitter }}</td>
|
|
|
|
<td>{{ post[0] }} WOW</td>
|
|
|
|
</tr>
|
2020-08-10 23:58:39 +01:00
|
|
|
{% endfor %}
|
2020-09-16 20:31:27 +01:00
|
|
|
</table>
|
2020-08-10 23:58:39 +01:00
|
|
|
{% else %}
|
|
|
|
<p>No posts yet!</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-09-16 20:31:27 +01:00
|
|
|
<hr>
|
|
|
|
<a href="{{ url_for('index') }}"><button class="btn btn-warning">Go Home</button></a>
|
2020-08-10 23:58:39 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|