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;
|
||||
}
|
||||
|
||||
input.search {
|
||||
padding: 0.5em;
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
#content {
|
||||
display: flex;
|
||||
align-items: 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 %}
|
||||
<ul>
|
||||
<ul class="torrents">
|
||||
{% for torrent in torrents %}
|
||||
<li>
|
||||
<span>{{ torrent.name }}</span>
|
||||
<span>{{ torrent.name[:50] }}</span>
|
||||
<span>{{ torrent.format_eta() }}</span>
|
||||
<span><a hx-post="/delete">delete</a></span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<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>
|
||||
</menu>
|
||||
<div id="content">
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
{% 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 %}
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
{% block content %}
|
||||
<ul class="torrents">
|
||||
{% for torrent in torrents %}
|
||||
<li hx-get="/download?{{ torrent.magnetlink | safe }}" hx-target="#content" hx-replace-url="/active" hx-push-url="true">
|
||||
<li>
|
||||
<span><b>Title</b></span>
|
||||
<span><b>Seeds</b></span>
|
||||
<span><b>Leeches</b></span>
|
||||
<span><b>Filesize</b></span>
|
||||
<span><b>Category</b></span>
|
||||
</li>
|
||||
<hr />
|
||||
{% 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 %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Reference in a new issue