Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 59 additions & 25 deletions buzz/static/buzz.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,23 @@ button.secondary {
font-weight: bold;
}

.table-wrap {
.table-container {
overflow-x: auto;
max-width: 100%;
}

.table-container table {
border-collapse: collapse;
}

.table-container td:first-of-type {
min-width: 200px;
}

table {
width: 100%;
border-collapse: collapse;
font-size: 0.8rem;
table-layout: fixed;
}

th {
Expand Down Expand Up @@ -195,15 +203,42 @@ tr:hover {

.trunc-cell {
position: relative;
max-width: 1px;
max-width: 0;
overflow: hidden;
}

/* normal state: real ellipsis */
.trunc-idle {
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.trunc-content {
/* hover state: hidden by default */
.trunc-scroll-wrap {
display: none;
width: 100%;
overflow: hidden;
white-space: nowrap;
}

.trunc-scroll {
display: inline-block;
white-space: nowrap;
}

.trunc-cell:hover .trunc-content {
/* swap on hover */
.trunc-cell:hover .trunc-idle {
display: none;
}

.trunc-cell:hover .trunc-scroll-wrap {
display: block;
}

.trunc-cell:hover .trunc-scroll {
animation: scroll-text 4s linear infinite;
}

Expand Down Expand Up @@ -242,42 +277,31 @@ code {
padding: 40px;
}

.trashcan-opts,
.delete-container {
display: flex;
width: 100%;
height: 100%;
min-height: 35px;
align-items: stretch;
min-width: 70px;
}

.trashcan-opts,
.confirm-opts {
display: none;
flex-direction: row;
align-items: center;
justify-content: center;
justify-content: space-evenly;
width: 100%;
height: 100%;
background: rgba(255, 184, 108, 0.2);
gap: 15px;
gap: 0;
}

.opt {
cursor: pointer;
text-align: center;
font-weight: bold;
color: var(--orange);
}

.opt-y:hover {
color: var(--green);
text-shadow: 0 0 5px rgba(80, 250, 123, 0.5);
}

.opt-n:hover {
color: var(--red);
text-shadow: 0 0 5px rgba(255, 85, 85, 0.5);
.confirm-opts {
display: none;
background: rgba(255, 184, 108, 0.2);
}

.opt,
.btn-r,
.btn-del,
.btn-x {
Expand All @@ -303,6 +327,16 @@ code {
background: rgba(255, 85, 85, 0.1);
}

.opt-y:hover {
color: var(--green);
text-shadow: 0 0 5px rgba(80, 250, 123, 0.5);
}

.opt-n:hover {
color: var(--red);
text-shadow: 0 0 5px rgba(255, 85, 85, 0.5);
}

::-webkit-scrollbar {
width: 8px;
height: 8px;
Expand Down
41 changes: 26 additions & 15 deletions buzz/templates/torrents.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,32 @@

th:nth-child(6),
td:nth-child(6) {
width: 60px;
width: 150px;
}

th:nth-child(7),
td:nth-child(7) {
width: 150px;
width: 85px;
}

th:nth-child(8),
td:nth-child(8) {
width: 85px;
width: 80px;
text-align: center;
}

th:nth-child(9),
td:nth-child(9) {
width: 75px;
text-align: right;
@media (max-width: 500px) {

th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3),
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7) {
display: none;
}
}

.status {
Expand Down Expand Up @@ -217,7 +226,7 @@
</div>
</section>

<div class="table-wrap">
<div class="table-container">
<table id="torrent-table">
<thead>
<tr>
Expand All @@ -226,23 +235,25 @@
<th onclick="sortTable(2)">Prog</th>
<th onclick="sortTable(3)">Size</th>
<th onclick="sortTable(4)">Files</th>
<th onclick="sortTable(5)">Links</th>
<th onclick="sortTable(6)">Ended</th>
<th onclick="sortTable(7)">ID</th>
<th onclick="sortTable(5)">Ended</th>
<th onclick="sortTable(6)">ID</th>
<th>Act</th>
</tr>
</thead>
<tbody>
{% for torrent in torrents %}
<tr>
<td class="name trunc-cell" data-value="{{ torrent.name }}">
<div class="trunc-content">{{ torrent.name }}</div>
<div class="trunc-idle">{{ torrent.name }}</div>
<div class="trunc-scroll-wrap">
<span class="trunc-scroll">{{ torrent.name }}</span>
</div>
</td>
<td data-value="{{ torrent.status }}"><span class="status status-{{ torrent.status }}">[{{ torrent.status }}]</span></td>
<td data-value="{{ torrent.status }}"><span class="status status-{{ torrent.status }}">[{{ torrent.status
}}]</span></td>
<td data-value="{{ torrent.progress }}">{{ torrent.progress }}%</td>
<td data-value="{{ torrent.bytes }}">{{ torrent.size }}</td>
<td>{{ torrent.selected_files }}</td>
<td>{{ torrent.links }}</td>
<td class="comment" data-value="{{ torrent.ended }}">{{ torrent.ended }}</td>
<td class="yellow" data-value="{{ torrent.short_id }}"><code>{{ torrent.short_id }}</code></td>
<td>
Expand All @@ -259,7 +270,7 @@
</tr>
{% else %}
<tr>
<td colspan="9" class="empty">No cached torrents yet. Wait for the first sync or trigger <code>POST
<td colspan="8" class="empty">No cached torrents yet. Wait for the first sync or trigger <code>POST
/sync</code>.</td>
</tr>
{% endfor %}
Expand Down
Loading
Loading