Skip to content

Commit fb991e6

Browse files
Represent 30 days change in the completion bar (#71)
Represent the month change inside completion bar Authored-by: Maciej Olko <[email protected]>
2 parents db81660 + 5d19aa2 commit fb991e6

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 }}%;{% if project.change %}background: linear-gradient(to left, lightgreen {{ project.change * 100 / project.completion }}%, #4caf50 {{ project.change * 100 / project.completion }}%);{% else %}background-color: #4caf50;{% endif %}"
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)