Skip to content

Commit 6325937

Browse files
committed
Add native progress
1 parent c680fdd commit 6325937

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

style.css

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,10 @@ th, td {
1414
th {
1515
background-color: #f4f4f4;
1616
}
17-
.progress-bar {
18-
background-color: #4caf50;
19-
color: white;
20-
height: 20px;
21-
line-height: 20px;
22-
text-align: center;
23-
overflow: hidden;
24-
white-space: nowrap;
25-
min-width: 50px;
26-
box-sizing: border-box;
17+
progress {
18+
width: 100%;
2719
}
28-
td[data-label="visitors"], td[data-label="translators"] {
20+
td[data-label="visitors"], td[data-label="translators"], td[data-label="completion-number"] {
2921
text-align: right;
3022
}
3123
td[data-label="completion"] {
@@ -59,8 +51,4 @@ td[data-label="completion"] {
5951
td[data-label="completion"] {
6052
width: inherit;
6153
}
62-
.progress-bar {
63-
min-width: 0;
64-
width: 100% !important;
65-
}
6654
}

template.html.jinja

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<th>build</th>
1414
<th><a href="https://plausible.io/data-policy#how-we-count-unique-users-without-cookies" target="_blank">visitors</a></th>
1515
<th>translators</th>
16-
<th>completion</th>
16+
<th colspan="2">completion</th>
1717
</tr>
1818
</thead>
1919
<tbody>
@@ -46,8 +46,11 @@
4646
{{ translators }}
4747
{% if translators_link %}</a>{% endif %}
4848
</td>
49-
<td data-label="completion">
50-
<div class="progress-bar" style="width: {{ completion | round(2) }}%;">{{ completion | round(2) }}%</div>
49+
<td data-label="completion-number">
50+
{{ completion | round(2) }}%
51+
</td>
52+
<td data-label="completion-bar">
53+
<progress value="{{ completion }}" max="100"></progress>
5154
</td>
5255
</tr>
5356
{% endfor %}

0 commit comments

Comments
 (0)