Skip to content

Commit 5cc3b39

Browse files
committed
Represent the month change inside completion bar
1 parent db81660 commit 5cc3b39

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ th {
1616
}
1717
.progress-bar {
1818
display: inline-block;
19-
background-color: #4caf50;
2019
color: white;
2120
height: 20px;
2221
line-height: 20px;

template.html.jinja

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
{% if project.translators.link %}</a>{% endif %}
3636
</td>
3737
<td data-label="completion">
38-
<div class="progress-bar" style="width: {{ project.completion }}%;">{{ "{:.2f}".format(project.completion) }}%</div>
38+
<div class="progress-bar"
39+
style="width: {{ project.completion }}%;background: linear-gradient(to left, #4caf50 {{ project.change * 100 / project.completion }}%, lightgreen {{ project.change * 100 / project.completion }}%);"
40+
title="{{ '{:.2f}'.format(project.completion) }}%, {{ '{:.2f}'.format(project.change) }} percentage points last month"
41+
>
42+
{{ "{:.2f}".format(project.completion) }}%
43+
</div>
3944
<div class="progress-bar-outer-label">{{ "{:.2f}".format(project.completion) }}%</div>
4045
</td>
4146
</tr>

0 commit comments

Comments
 (0)