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; margin: .7em;
} }
details,
table,
p {
margin: 1em 0;
}
h2 { h2 {
font-size: 1.7em; font-size: 1.7em;
margin: 1em 0 .5em; margin: 1em 0 .5em;
@ -27,7 +33,6 @@ button {
} }
details { details {
margin: 1em 0;
padding: .3em 1ch; padding: .3em 1ch;
background-color: #ddd; background-color: #ddd;
} }
@ -36,6 +41,7 @@ details>summary {
font-weight: bold; font-weight: bold;
margin-left: 0; margin-left: 0;
list-style-type: "> "; list-style-type: "> ";
cursor: pointer;
} }
details[open]>summary { details[open]>summary {
@ -60,8 +66,6 @@ dd {
margin-left: 4ch; margin-left: 4ch;
} }
/*
table { table {
border-collapse: collapse; border-collapse: collapse;
} }
@ -71,13 +75,17 @@ tbody tr:hover {
background-color: #ddd; background-color: #ddd;
} }
th,
td {
padding: .1em 0;
}
th+th, th+th,
td+td { td+td {
padding-left: 2ch; padding-left: 2ch;
} }
*/
/* Nav bar */ /* Nav bar */
nav { nav {
@ -134,6 +142,38 @@ nav a:hover {
color: #a33; 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 */ /* 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() %} {% if workers.is_empty() %}
<p>No workers connected</p> <p>No workers connected</p>
{% else %} {% else %}
<table> <table class="queue-workers">
<thead> <thead>
<tr> <tr>
<th>worker</th> <th>worker</th>
@ -30,12 +30,12 @@
<h2>Queue ({{ tasks.len() }})</h2> <h2>Queue ({{ tasks.len() }})</h2>
<table id="queue" data-count="{{ tasks.len() }}"> <table id="queue" class="queue-commits" data-count="{{ tasks.len() }}">
<thead> <thead>
<tr> <tr>
<th>commit</th> <th>commit</th>
<th>since</th> <th>since</th>
<th>prio</th> <th>priority</th>
<th>worker</th> <th>worker</th>
</tr> </tr>
</thead> </thead>
@ -49,14 +49,10 @@
</td> </td>
<td> <td>
{{ task.priority }} {{ task.priority }}
[<form method="post" action="{{ task.link_increase }}"> [<form method="post" action="{{ task.link_increase }}"><input type="hidden" name="hash"
<input type="hidden" name="hash" value="{{ task.hash }}"> value="{{ task.hash }}"><button title="Increase priority by 1">inc</button></form>/<form
<button title="Increase priority by 1">inc</button> method="post" action="{{ task.link_decrease }}"><input type="hidden" name="hash"
</form>, value="{{ task.hash }}"><button title="Decrease priority by 1">dec</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> </td>
{% if task.workers.is_empty() %} {% if task.workers.is_empty() %}
<td>-</td> <td>-</td>