Skip to content

Commit b4a145a

Browse files
committed
Display progress out of progress bar when low
1 parent c680fdd commit b4a145a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

style.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ th {
1515
background-color: #f4f4f4;
1616
}
1717
.progress-bar {
18+
display: inline-block;
1819
background-color: #4caf50;
1920
color: white;
2021
height: 20px;
2122
line-height: 20px;
2223
text-align: center;
2324
overflow: hidden;
2425
white-space: nowrap;
25-
min-width: 50px;
2626
box-sizing: border-box;
2727
}
28+
.progress-bar.appendix {
29+
background-color: inherit;
30+
color: inherit;
31+
padding-left: .5em;
32+
}
2833
td[data-label="visitors"], td[data-label="translators"] {
2934
text-align: right;
3035
}

template.html.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +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) }}%;">{{ completion | round(2) }}%</div>
50+
<div class="progress-bar" style="width: {{ completion | round(2) }}%;">{% if completion >= 0.05 %}{{ completion | round(2) }}{% endif %}%</div>
51+
{% if completion < 0.05 %}<div class="progress-bar appendix">{{ completion | round(2) }}</div>{% endif %}
5152
</td>
5253
</tr>
5354
{% endfor %}

0 commit comments

Comments
 (0)