Show daily streak on dashboard

This commit is contained in:
Peter Stockings
2026-02-24 20:58:04 +11:00
parent 1c935a64be
commit 9323082d37
3 changed files with 143 additions and 7 deletions

View File

@@ -34,9 +34,11 @@
<div class="stat-label">Current BMI</div>
<div class="stat-value">{{ '%.1f' % (latest.bmi | float) if latest and latest.bmi else '—' }}</div>
</div>
<div class="stat-card">
<div class="stat-card {{ 'stat-card-streak' if streak.current >= 3 }}">
<div class="stat-label">Check-ins</div>
<div class="stat-value">{{ stats.total_checkins if stats else 0 }}</div>
<div class="stat-change" style="color: var(--warning);">🔥 {{ streak.current }}-day streak{% if streak.best >
streak.current %} · Best: {{ streak.best }}{% endif %}</div>
</div>
</div>