stil
This commit is contained in:
parent
3e76a70369
commit
7273e90066
5 changed files with 39 additions and 16 deletions
|
@ -65,8 +65,26 @@ menu li:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.search {
|
||||||
|
padding: 0.5em;
|
||||||
|
width: 30em;
|
||||||
|
}
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.torrents {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.torrents li {
|
||||||
|
padding: 0.5em;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: [title] 60% [seed] 8% [leech] 7% [size] 10% [category] 15% [end];
|
||||||
|
}
|
||||||
|
ul.torrents li:hover {
|
||||||
|
background-color: bisque;
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<ul>
|
<ul class="torrents">
|
||||||
{% for torrent in torrents %}
|
{% for torrent in torrents %}
|
||||||
<li>
|
<li>
|
||||||
<span>{{ torrent.name }}</span>
|
<span>{{ torrent.name[:50] }}</span>
|
||||||
<span>{{ torrent.format_eta() }}</span>
|
<span>{{ torrent.format_eta() }}</span>
|
||||||
|
<span><a hx-post="/delete">delete</a></span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<menu>
|
<menu>
|
||||||
<li hx-get="/search" hx-replace-url="/search" hx-target="#content">Search</li>
|
<li>Search <input class="search" hx-get="/list" hx-replace-url="true" hx-target="#content" type=text name=query /></li>
|
||||||
<li hx-get="/active" hx-replace-url="/active" hx-target="#content">Active downloads</li>
|
<li hx-get="/active" hx-replace-url="/active" hx-target="#content">Active downloads</li>
|
||||||
</menu>
|
</menu>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
|
@ -1,6 +1,2 @@
|
||||||
{% block content %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<ul class="torrents">
|
<ul class="torrents">
|
||||||
{% for torrent in torrents %}
|
<li>
|
||||||
<li hx-get="/download?{{ torrent.magnetlink | safe }}" hx-target="#content" hx-replace-url="/active" hx-push-url="true">
|
<span><b>Title</b></span>
|
||||||
<span>{{ torrent.title }}</span>
|
<span><b>Seeds</b></span>
|
||||||
<span>({{ torrent.seeds }})</span>
|
<span><b>Leeches</b></span>
|
||||||
<span>({{ torrent.leeches }})</span>
|
<span><b>Filesize</b></span>
|
||||||
<span>({{ torrent.filesize }})</span>
|
<span><b>Category</b></span>
|
||||||
<span>{{ torrent.category }}</span>
|
</li>
|
||||||
</li>
|
<hr />
|
||||||
{% endfor %}
|
{% for torrent in torrents %}
|
||||||
|
<li hx-get="/download?{{ torrent.magnetlink | safe }}" hx-target="#content" hx-replace-url="/active" hx-push-url="true">
|
||||||
|
<span>{{ torrent.title }}</span>
|
||||||
|
<span>({{ torrent.seeds }})</span>
|
||||||
|
<span>({{ torrent.leeches }})</span>
|
||||||
|
<span>({{ torrent.filesize }})</span>
|
||||||
|
<span>{{ torrent.category }}</span>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue