magnetico/magneticow/data/templates/torrent.html

55 lines
1.7 KiB
HTML
Raw Normal View History

2017-04-02 22:11:58 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ torrent.name }} - magnetico</title>
<link rel="stylesheet" href="static/styles/reset.css">
<link rel="stylesheet" href="static/styles/essential.css">
<link rel="stylesheet" href="static/styles/torrent.css">
<script defer src="static/scripts/torrent.js"></script>
2017-04-02 22:11:58 +02:00
</head>
<body>
<header>
<div><a href="/"><b>magnetico<sup>w</sup></b></a>&#8203;<sub>(pre-alpha)</sub></div>
<form action="/torrents" method="get" autocomplete="off" role="search">
<input type="search" name="search" placeholder="Search the BitTorrent DHT">
</form>
</header>
<main>
<div id="title">
<h2>{{ torrent.name }}</h2>
<a href="magnet:?xt=urn:btih:{{ torrent.info_hash }}&dn={{ torrent.name }}">
<img src="static/assets/magnet.gif" alt="Magnet link"
2017-04-02 22:11:58 +02:00
title="Download this torrent using magnet" />
<small>{{ torrent.info_hash }}</small>
</a>
</div>
<table>
<tr>
<th scope="row">Size</th>
<td>{{ torrent.size }}</td>
</tr>
<tr>
<th scope="row">Discovered on</th>
<td>{{ torrent.discovered_on }}</td>
</tr>
<tr>
<th scope="row">Files</th>
<td>{{ torrent.files|length }}</td>
</tr>
</table>
<h3>Contents</h3>
<noscript>
<pre>
{% for file in torrent.files -%}
{{ file.path }}{{ "\n" }}
{%- endfor %}
</pre>
</noscript>
<!-- Content of this element will be overwritten by the script -->
<pre>{% for file in torrent.files -%}{{ file.path }}{{ "\t" + file.size }}{{ "\n" }}{%- endfor %}</pre>
</main>
</body>
</html>