{% extends "layout.html" %}
{% block title %} - Latest torrents{% endblock %}
{% block body %}
<table class="table is-bordered is-striped is-narrow is-fullwidth is-hoverable is-size-7">
<thead>
<tr>
<th>Name</th>
<th>Link</th>
<th>Size</th>
<th>Date</th>
<th>
<i class="fa fa-arrow-up"></i>
</th>
<i class="fa fa-arrow-down"></i>
<i class="fa fa fa-check"></i>
</tr>
</thead>
<tbody>
{% for torrent in torrents %}
<tr class="{{ torrent.class }}">
{% if torrent.self.is_light %}
<td colspan="3">
<img class="favicon"
src="{{ url_for('static', filename='favicons/%s' % torrent.self.favicon) }}" alt="">
<i> </i>
{{ torrent.lang.value }}
<a href="{{ torrent.href }}" target="_blank">
{{ torrent.name }}
</a>
</td>
<td>
{{ torrent.date }}
{{ torrent.type }}
{% else %}
{{ torrent.link|safe }}
{{ torrent.comment|safe }}
{{ torrent.size }}
{{ torrent.seeds }}
{{ torrent.leechs }}
{{ torrent.downloads }}
{% endif %}
{% endfor %}
</tbody>
</table>
<nav class="pagination is-right" role="navigation" aria-label="pagination">
{% if page > 1 %}
<a class="pagination-previous" href="{{ url_for('latest', q=request.args.get('q'), page=(page - 1)) }}">
Previous
<a class="pagination-next" href="{{ url_for('latest', q=request.args.get('q'), page=(page + 1)) }}">
Next page
<ul class="pagination-list"></ul>
</nav>
{% endblock %}