everything works, needs makeup though
This commit is contained in:
parent
5130450355
commit
464683e9ce
14 changed files with 377 additions and 0 deletions
12
templates/active_torrents.html
Normal file
12
templates/active_torrents.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends 'index.html' %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for torrent in torrents %}
|
||||
<li>
|
||||
<span>{{ torrent.name }}</span>
|
||||
<span>{{ torrent.format_eta() }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
23
templates/index.html
Normal file
23
templates/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Search and download torrents directly to mediacenter</title>
|
||||
<script src="https://unpkg.com/htmx.org@2.0.0" integrity="sha384-wS5l5IKJBvK6sPTKa2WZ1js3d947pvWXbPJ1OmWfEuxLgeHcEbjUUA5i9V5ZkpCw" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<menu>
|
||||
<li hx-get="/" hx-replace-url="/" hx-target="#content">Search</li>
|
||||
<li hx-get="/active" hx-replace-url="/active" hx-target="#content">Active downloads</li>
|
||||
</menu>
|
||||
{% block content %}
|
||||
<form hx-get="/list" hx-replace-url="true" hx-target="#content">
|
||||
<input type=text name=query />
|
||||
<button type=submit>search</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
15
templates/torrents.html
Normal file
15
templates/torrents.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends 'index.html' %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for torrent in torrents %}
|
||||
<li hx-get="/download?{{ torrent.magnetlink | safe }}" hx-target="#content" hx-replace-url="/active">
|
||||
<span>{{ torrent.title }}</span>
|
||||
<span>({{ torrent.seeds }})</span>
|
||||
<span>({{ torrent.leeches }})</span>
|
||||
<span>({{ torrent.filesize }})</span>
|
||||
<span>{{ torrent.category }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue