This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/templates/latest.html
2019-12-03 22:43:53 +01:00

92 lines
3.0 KiB
HTML

{% 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>
<th>
<i class="fa fa-arrow-down"></i>
</th>
<th>
<i class="fa fa fa-check"></i>
</th>
</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>&nbsp;</i>
{{ torrent.lang.value }}
<a href="{{ torrent.href }}" target="_blank">
{{ torrent.name }}
</a>
</td>
<td>
{{ torrent.date }}
</td>
<td colspan="3">
{{ torrent.type }}
</td>
{% else %}
<td>
<img class="favicon"
src="{{ url_for('static', filename='favicons/%s' % torrent.self.favicon) }}" alt="">
<i>&nbsp;</i>
{{ torrent.lang.value }}
<a href="{{ torrent.href }}" target="_blank">
{{ torrent.name }}
</a>
</td>
<td>
{{ torrent.link|safe }}
{{ torrent.comment|safe }}
</td>
<td>
{{ torrent.size }}
</td>
<td>
{{ torrent.date }}
</td>
<td>
{{ torrent.seeds }}
</td>
<td>
{{ torrent.leechs }}
</td>
<td>
{{ torrent.downloads }}
</td>
{% endif %}
</tr>
{% 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>
{% endif %}
<a class="pagination-next" href="{{ url_for('latest', q=request.args.get('q'), page=(page + 1)) }}">
Next page
</a>
<ul class="pagination-list"></ul>
</nav>
{% endblock %}