implement magnet links

This commit is contained in:
yggverse 2025-08-05 15:06:44 +03:00
parent ec6d9a4e00
commit 7da285ca69
5 changed files with 58 additions and 31 deletions

View file

@ -1,9 +1,16 @@
{% extends "layout/default" %}
{% block content %}
{% for torrent in torrents %}
<div>
<a name="{{ torrent.info_hash }}"></a>
<h2>{{ torrent.name }}</h2>
</div>
{% for row in rows %}
<div>
<a name="{{ row.torrent.info_hash }}"></a>
<h2>{{ row.torrent.name }}</h2>
<div>
<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>
</div>
</div>
{% endfor %}
{% endblock content %}

View file

@ -86,12 +86,22 @@
margin: 0 auto;
}
/* item row */
main > div {
background-color: #34384f;
border-radius: 3px;
margin: 8px 0;
padding: 24px;
}
/* controls */
main > div > div {
float: right;
}
main > div > div > a> svg {
vertical-align: middle;
}
</style>
</head>
<body>