46 lines
1.2 KiB
HTML
46 lines
1.2 KiB
HTML
{% 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 %}
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th>Date</th>
|
|
<th>ID</th>
|
|
<th>Title</th>
|
|
<th>Submitter</th>
|
|
<th>Thumbnail</th>
|
|
<th>Amount</th>
|
|
</tr>
|
|
{% for post in posts %}
|
|
<tr>
|
|
<td>{{ post[1].timestamp.strftime('%Y-%m-%d %H:%M') }}</td>
|
|
<td>{{ post[1].id }}</td>
|
|
<td><a href="{{ url_for('post.read', id=post[1].id) }}">{{ post[1].title }}</a></td>
|
|
<td><a href="/?submitter={{ post[1].submitter }}">{{ post[1].submitter }}</a></td>
|
|
<td>
|
|
<a href="{{ url_for('post.read', id=post[1].id) }}">
|
|
<img src="{{ url_for('post.uploaded_file', filename=post[1].get_thumbnail_name()) }}" width=200 style="max-height:200px;">
|
|
</a>
|
|
</td>
|
|
<td>{{ post[0] }} WOW</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% else %}
|
|
<p>No posts yet!</p>
|
|
{% endif %}
|
|
|
|
<hr>
|
|
<a href="{{ url_for('index') }}"><button class="btn btn-warning">Go Home</button></a>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|