implement scrape frontend, optimize css, init static svg assets

This commit is contained in:
yggverse 2025-08-06 21:00:46 +03:00
parent 4d5e0f5b79
commit 70c0174fbc
7 changed files with 104 additions and 39 deletions

View file

@ -1,32 +1,33 @@
{% extends "layout/default" %}
{% block content %}
{% if rows %}
{% for row in rows %}
<div>
<a name="{{ row.torrent.info_hash }}"></a>
<h2>{{ row.torrent.name }}</h2>
{% if row.torrent.comment %}<p>{{ row.torrent.comment }}</p>{% endif %}
{% if rows %}
{% for row in rows %}
<div>
<ul>
<li><span title="Indexed">{{ row.indexed }}</span></li>
{% if row.created %}<li><span title="Created">({{ row.created }})</span></li>{% endif %}
{% if row.size %}<li><span title="Size">{{ row.size }}</span></li>{% endif %}
<li><span title="Files">{{ row.files }}</span></li>
</ul>
<a rel="nofollow" href="{{ row.magnet }}" title="Magnet">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
<path d="M15 12h-4v3h4v-3ZM5 12H1v3h4v-3ZM0 8a8 8 0 1 1 16 0v8h-6V8a2 2 0 1 0-4 0v8H0V8Z"/>
</svg>
</a>
<a name="{{ row.torrent.info_hash }}"></a>
<h2>{{ row.torrent.name }}</h2>
{% if row.torrent.comment %}<p>{{ row.torrent.comment }}</p>{% endif %}
<div>
<ul>
<li><span title="Indexed">{{ row.indexed }}</span></li>
{% if row.created %}<li><span title="Created">({{ row.created }})</span></li>{% endif %}
{% if row.size %}<li><span title="Size">{{ row.size }}</span></li>{% endif %}
<li><span title="Files">{{ row.files }}</span></li>
{% if row.scrape %}
<li><span title="Seeders" class="seeders">{{ row.scrape.seeders }}</span></li>
<li><span title="Peers" class="peers">{{ row.scrape.seeders }}</span></li>
<li><span title="Leechers" class="leechers">{{ row.scrape.seeders }}</span></li>
{% endif %}
</ul>
<div>
<a rel="nofollow" href="{{ row.magnet }}" title="Get magnet" class="action magnet"></a>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div>
Nothing.
</div>
{% endif %}
{% if next %}<a href="{{ next }}">Next</a>{% endif %}
{% if back %}<a href="{{ back }}">Back</a>{% endif %}
<span>{{ pagination_totals }}</span>
{% endfor %}
{% else %}
<div>Nothing.</div>
{% endif %}
{% if next %}<a href="{{ next }}">Next</a>{% endif %}
{% if back %}<a href="{{ back }}">Back</a>{% endif %}
<span>{{ pagination_totals }}</span>
{% endblock content %}