Style queue commit table

This commit is contained in:
Joscha 2023-08-17 23:06:22 +02:00
parent acef1931bc
commit a97b229e7d
2 changed files with 52 additions and 35 deletions

View file

@ -8,6 +8,12 @@ body {
margin: .7em;
}
details,
table,
p {
margin: 1em 0;
}
h2 {
font-size: 1.7em;
margin: 1em 0 .5em;
@ -27,7 +33,6 @@ button {
}
details {
margin: 1em 0;
padding: .3em 1ch;
background-color: #ddd;
}
@ -36,6 +41,7 @@ details>summary {
font-weight: bold;
margin-left: 0;
list-style-type: "> ";
cursor: pointer;
}
details[open]>summary {
@ -60,8 +66,6 @@ dd {
margin-left: 4ch;
}
/*
table {
border-collapse: collapse;
}
@ -71,13 +75,17 @@ tbody tr:hover {
background-color: #ddd;
}
th,
td {
padding: .1em 0;
}
th+th,
td+td {
padding-left: 2ch;
}
*/
/* Nav bar */
nav {
@ -134,6 +142,38 @@ nav a:hover {
color: #a33;
}
/* Queue */
.queue-commits form {
display: inline;
}
.queue-commits button {
font-size: inherit;
background-color: unset;
border: unset;
text-decoration: underline;
padding: 0;
cursor: pointer;
}
.queue-commits button:hover {
font-weight: bold;
}
.queue-commits td:nth-child(2),
.queue-commits td:nth-child(3) {
text-align: right;
}
.queue-commits .odd {
background-color: #eee;
}
.queue-commits .odd:hover {
background-color: #ddd;
}
/* Commit */
/*
@ -180,22 +220,3 @@ nav a:hover {
}
*/
/* Queue */
/*
#queue td:nth-child(2),
#queue td:nth-child(3) {
text-align: right;
}
#queue .odd {
background-color: #eee;
}
#queue .odd:hover {
background-color: #ddd;
}
*/

View file

@ -3,7 +3,7 @@
{% if workers.is_empty() %}
<p>No workers connected</p>
{% else %}
<table>
<table class="queue-workers">
<thead>
<tr>
<th>worker</th>
@ -30,12 +30,12 @@
<h2>Queue ({{ tasks.len() }})</h2>
<table id="queue" data-count="{{ tasks.len() }}">
<table id="queue" class="queue-commits" data-count="{{ tasks.len() }}">
<thead>
<tr>
<th>commit</th>
<th>since</th>
<th>prio</th>
<th>priority</th>
<th>worker</th>
</tr>
</thead>
@ -49,14 +49,10 @@
</td>
<td>
{{ task.priority }}
[<form method="post" action="{{ task.link_increase }}">
<input type="hidden" name="hash" value="{{ task.hash }}">
<button title="Increase priority by 1">inc</button>
</form>,
<form method="post" action="{{ task.link_decrease }}">
<input type="hidden" name="hash" value="{{ task.hash }}">
<button title="Decrease priority by 1">dec</button>
</form>]
[<form method="post" action="{{ task.link_increase }}"><input type="hidden" name="hash"
value="{{ task.hash }}"><button title="Increase priority by 1">inc</button></form>/<form
method="post" action="{{ task.link_decrease }}"><input type="hidden" name="hash"
value="{{ task.hash }}"><button title="Decrease priority by 1">dec</button></form>]
</td>
{% if task.workers.is_empty() %}
<td>-</td>