Skip to content

Commit 4e4c9dd

Browse files
authored
Merge pull request #29 from bryanburgers/style-touchups
Restyle the queue page
2 parents 4f0b3a9 + e311cfc commit 4e4c9dd

File tree

1 file changed

+85
-13
lines changed

1 file changed

+85
-13
lines changed

homu/html/queue.html

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,95 @@
44
<meta charset="utf-8">
55
<title>Homu queue - {{repo_label}} {% if treeclosed %} [TREE CLOSED] {% endif %}</title>
66
<style>
7+
@keyframes barber-pole {
8+
/* This animation is used to make the status indicator next to
9+
pending pulls look like a barber poll. We do that with a
10+
diagonal linear gradient. CSS does not allow us to animate a
11+
gradient, so instead we make the indicator a little taller
12+
than shown, and then animate the whole thing upward. */
13+
from{
14+
transform: translate(0, 0);
15+
}
16+
to {
17+
/* The magic number 11.314 is sqrt(8^2 + 8^2), based on how
18+
far vertically it takes to repeat a 45 degree gradient
19+
that is 8 pixels long before it repeats. */
20+
transform: translate(0, -11.314px);
21+
}
22+
}
723
* { font-family: sans-serif; }
824
h1 { font-size: 20px; }
925
h2 { font-size: 16px; }
1026
p { font-size: 15px; }
1127

1228
table { border-collapse: collapse; }
13-
td, th { border: 2px solid white; padding: 5px; font-size: 13px; }
14-
tr:nth-child(even) { background: #ddd; }
29+
td, th { border-bottom: 1px solid #ddd; padding: 5px 6px; font-size: 13px; text-align: left; vertical-align: baseline; }
30+
tr:nth-child(even) { background: #eee; }
1531

32+
a {
33+
text-decoration: none;
34+
}
35+
a:hover {
36+
text-decoration: underline;
37+
}
38+
39+
.status {
40+
position: relative;
41+
overflow: hidden;
42+
padding-left: 16px;
43+
white-space: nowrap;
44+
}
45+
.status:before {
46+
content: " ";
47+
position: absolute;
48+
display: block;
49+
left: 6px;
50+
width: 6px;
51+
top: 0;
52+
bottom: 0;
53+
}
1654
.treeclosed { color: grey }
17-
.success { background-color: #80C0F0; }
18-
.failure, .error { background-color: #F08080; }
19-
.pending { background-color: #F0DE57; }
20-
.approved { background-color: #85DB7B; }
55+
.success:before { background-color: #80C0F0; }
56+
.failure:before, .error::before { background-color: #F08080; }
57+
.approved:before { background-color: #85DB7B; }
58+
.pending:before {
59+
/* Give the pending state a little bit of animation to make it
60+
clear that these items are the ones that are being tested
61+
right now. */
62+
bottom: -20px;
63+
background-color: #F0DE57;
64+
background-image: repeating-linear-gradient(135deg, #F0DE57 0, #F0DE57 4px, #FBEE97 4px, #FBEE97 8px, #F0DE57 0);
65+
animation: barber-pole 1s linear infinite;
66+
}
67+
.number { text-align: right; }
68+
69+
/* Make a non-zero priority stand out by making 0 normal and gray,
70+
and non-zero bold and black. */
71+
.priority { text-align: right; font-weight: bold; }
72+
.priority[data-priority="0"] { font-weight: normal; color: #999; }
2173

22-
.yes, .rollup_always { color: green; }
23-
.no, .rollup_never { color: red; }
74+
.yes, .rollup_always, .no, .rollup_never {
75+
white-space: nowrap;
76+
}
77+
.yes:before, .rollup_always:before, .no:before, .rollup_never:before {
78+
content: "";
79+
display: inline-block;
80+
width: 0.4em;
81+
height: 0.4em;
82+
border-radius: 50% 50%;
83+
margin-right: 0.3em;
84+
border: 1px solid transparent;
85+
}
86+
.yes, .rollup_always { color: #004200; }
87+
.yes:before, .rollup_always:before {
88+
background: #01ce01;
89+
border-color: #016c01;
90+
}
91+
.no, .rollup_never { color: #660000; }
92+
.no:before, .rollup_never:before {
93+
background: #f97070;
94+
border-color: #ab0a0a;
95+
}
2496

2597
.sorting_asc:after { content: " ▲"; }
2698
.sorting_desc:after { content: " ▼"; }
@@ -64,7 +136,7 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
64136
<p>
65137
{{ total }} total, {{ approved }} approved, {{ rolled_up }} rolled up, {{ failed }} failed
66138
/
67-
<label><input type="checkbox" id="auto_reload">Auto reload</label>
139+
<label><input type="checkbox" id="auto_reload"> Auto reload</label>
68140
/
69141
<input type="search" id="search" placeholder="Search">
70142
<button type="button" id="reset">Reset</button>
@@ -79,13 +151,13 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
79151
<th>Repository</th>
80152
{% endif %}
81153
<th>#</th>
82-
<th>Status</th>
154+
<th class="status">Status</th>
83155
<th>Mergeable</th>
84156
<th>Title</th>
85157
<th>Head ref</th>
86158
<th>Assignee</th>
87159
<th>Approved by</th>
88-
<th>Priority</th>
160+
<th class="priority">Priority</th>
89161
<th>Rollup</th>
90162
</tr>
91163
</thead>
@@ -99,7 +171,7 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
99171
<td><a href="{{state.repo_url}}">{{state.repo_label}}</a></td>
100172
{% endif %}
101173
<td><a href="{{state.url}}">{{state.num}}</a></td>
102-
<td class="{{state.status}}">
174+
<td class="status {{state.status}}">
103175
{% if state.status == "pending" or state.status == "failure" or state.status == "success" %}
104176
<a href="../results/{{state.repo_label}}/{{state.num}}">{{state.status}}{{state.status_ext}}</a>
105177
{% else %}
@@ -111,7 +183,7 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
111183
<td>{{state.head_ref}}</td>
112184
<td>{{state.assignee}}</td>
113185
<td>{{state.approved_by}}</td>
114-
<td>{{state.priority}}</td>
186+
<td class="priority" data-priority="{{state.priority}}">{{state.priority}}</td>
115187
<td class="rollup_{{state.rollup}}">{{state.rollup}}</td>
116188
</tr>
117189
{% endfor %}

0 commit comments

Comments
 (0)