Improve in the progress bar visualization

This commit is contained in:
JKuijperM 2026-05-05 15:08:38 +02:00
parent 041d4aa17d
commit cef8cb3f57
2 changed files with 52 additions and 4 deletions

View File

@ -353,4 +353,41 @@ tbody tr:hover {
.dropdown:hover .dropdown-menu {
display: block;
}
.progress-container {
display: flex;
align-items: center;
gap: 10px;
}
.progress-label {
min-width: 50px;
font-size: 12px;
color: #666;
}
.progress-bar {
width: 100%;
background: #e0e0e0;
border-radius: 6px;
height: 14px;
overflow: hidden;
}
.progress-fill {
height: 100%;
transition: width 0.6s ease-in-out;
}
.progress-fill.low {
background: #e74c3c;
}
.progress-fill.medium {
background: #f1c40f;
}
.progress-fill.high {
background: #2ecc71;
}

View File

@ -22,10 +22,21 @@
<tr>
<td>{{ goal.name }}</td>
<td>
{{ goal.progress }} / {{ goal.target_amount }}
<div style="background:#eee; width:200px;">
<div style="background:#4caf50; width:{{ goal.percentage|unlocalize }}%; height:10px;"></div>
<div class="progress-container">
<span class="progress-label">
{{ goal.progress|floatformat:1 }}€ / {{ goal.target_amount|floatformat:1 }}€
</span>
<div class="progress-bar">
<div class="progress-fill
{% if goal.percentage < 50 %} low
{% elif goal.percentage < 80 %} medium
{% else %} high
{% endif %}"
style="width: {{ goal.percentage|unlocalize }}%"></div>
</div>
<span class="progress-label">
{{ goal.percentage|floatformat:1}}%
</span>
</div>
</td>