Skip to content

Commit ed4f749

Browse files
committed
Add script, add progress-bar-outer-label class
1 parent 92b5e8f commit ed4f749

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

style.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,26 @@ th {
2525
white-space: nowrap;
2626
box-sizing: border-box;
2727
}
28-
.progress-bar.appendix {
29-
background-color: inherit;
30-
color: inherit;
28+
.progress-bar-outer-label {
29+
display: none;
3130
padding-left: .5em;
31+
height: 20px;
32+
line-height: 20px;
33+
overflow: hidden;
34+
}
35+
.progress-bar.low {
36+
color: transparent;
37+
user-select: none;
38+
}
39+
.progress-bar.low + .progress-bar-outer-label {
40+
display: inline-block;
3241
}
3342
td[data-label="visitors"], td[data-label="translators"] {
3443
text-align: right;
3544
}
3645
td[data-label="completion"] {
3746
width: 100%;
47+
line-height: 0;
3848
}
3949
@media screen and (max-width: 600px) {
4050
table, thead, tbody, th, td, tr {

template.html.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
{% if translators_link %}</a>{% endif %}
4848
</td>
4949
<td data-label="completion">
50-
<div class="progress-bar" style="width: {{ completion | round(2) }}%;">{% if completion >= 5 %}{{ completion | round(2) }}%{% endif %}</div>
51-
{% if completion < 5 %}<div class="progress-bar appendix">{{ completion | round(2) }}%</div>{% endif %}
50+
<div class="progress-bar" style="width: {{ completion }}%;">{{ completion | round(2) }}%</div>
51+
<div class="progress-bar-outer-label">{{ completion | round(2) }}%</div>
5252
</td>
5353
</tr>
5454
{% endfor %}

0 commit comments

Comments
 (0)