Skip to content

Commit e50d599

Browse files
committed
Display label on the progress bar
1 parent 5250e22 commit e50d599

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

templates/index.html.jinja

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<div class="card-body">
1010
<h3 class="card-title"><a href="#{{ project.language.code }}">{{ project.language.name }}</a></h3>
1111
<h5 class="card-subtitle mb-2 text-muted">{{ project.translated_name }}</h5>
12-
<p class="text-muted">Completion: <strong>{{ '{:.2f}%'.format(project.completion) }}</strong></p>
13-
<p class="text-muted">30-day progress: {{ '{:.2f}%'.format(project.change) }}</p>
1412

1513
<ul class="links-row">
1614
{% if project.built %}
@@ -26,10 +24,10 @@
2624
</li>
2725
</ul>
2826
{# core progress bar #}
29-
{% set width, change = project.core_completion, project.core_change %}
27+
{% set width, change, kind = project.core_completion, project.core_change, 'core' %}
3028
{% include 'progress_bar.html.jinja' %}
3129
{# overall progress bar #}
32-
{% set width, change = project.completion, project.change %}
30+
{% set width, change, kind = project.completion, project.change, 'overall' %}
3331
{% set extra_container_class = 'mt-1' %}
3432
{% include 'progress_bar.html.jinja' %}
3533
</div>

templates/progress_bar.html.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
{% else %}
1313
background-color: #4caf50;
1414
{% endif %}">
15+
{{ kind }}: {{ '{:.2f}%'.format(project.completion) }} {% if project.change >= 0.01 %}({{ '{:+.2f}%'.format(project.change) }}){% endif %}
1516
</div>
1617
</div>

0 commit comments

Comments
 (0)