From 18273170e897ed2a1046a76554d95c95dd957abc Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Fri, 2 Oct 2026 14:50:04 +1000 Subject: [PATCH] Show standalone best effort badges with pace --- app/routes.py | 1 + app/static/style.css | 2 ++ app/templates/activity.html | 2 +- app/templates/dashboard.html | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index 3483aa4..0f9f7b9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -189,6 +189,7 @@ def dashboard(): personal=True, record_book=records_for(current_user.id, {row.id for row in pagination.items}), mapped_run=latest_mapped_run(filters), + pace_text=pace_text, ) diff --git a/app/static/style.css b/app/static/style.css index f2dd876..4bb6c83 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -33,6 +33,8 @@ body{font-family:"Segoe UI",Arial,sans-serif}h1{font-weight:650;letter-spacing:- .record-badges { display: flex; flex-wrap: wrap; gap: 8px; } .record-badge { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #394246; border-radius: 6px; color: #c5cccc; background: #202629; font-size: 12px; text-decoration: none; } .record-badge strong { font-size: 15px; color: #eeeae4; font-variant-numeric: tabular-nums; } +.run-record-badges { margin-bottom: 20px; } +.record-badge strong small { margin-left: 3px; font-size: 10px; font-weight: 400; color: #c5cccc; } .record-badge.is-pr { border-color: #886b34; background: #30291e; } .badge-award { color: #f3cb78; font-size: 11px; font-weight: 600; } a.record-badge:hover { border-color: #f3cb78; background: #3a3020; } diff --git a/app/templates/activity.html b/app/templates/activity.html index 566a2f2..b0df473 100644 --- a/app/templates/activity.html +++ b/app/templates/activity.html @@ -10,7 +10,7 @@
{{ activity.sport|upper }} · {{ activity.started_at|localdate(activity.owner.timezone, '%A, %d %B %Y') }}

{{ activity.title }}

By {% if public_view %}{{ activity.owner.display_name }}{% else %}{{ activity.owner.display_name }}{% endif %}·{{ activity.started_at|localdate(activity.owner.timezone, '%H:%M') }}·{{ '{:,}'.format(analysis.summary.samples) }} recorded samples

{{ 'Shared via link' if public_view else activity.visibility|title }}{% if owner_view %}{% endif %}
{% if owner_view %}

{% endif %} {% if efforts %} -

Best efforts on this run

Estimated · elapsed time
{% for effort in efforts %}{{ effort.label }}{{ effort.seconds|duration }}{% if effort.pr %}★ PR{% endif %}{% endfor %}
+
{% for effort in efforts %}{{ effort.label }}{{ pace_text(effort.seconds * 1000 / effort.distance) }}/km{% if effort.pr %}★ PR{% endif %}{% endfor %}
{% endif %}
diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html index e79bc5b..d8800f2 100644 --- a/app/templates/dashboard.html +++ b/app/templates/dashboard.html @@ -23,7 +23,7 @@ {% if personal %}
YOUR FASTEST DISTANCES

Personal records

Estimated · elapsed time

Fastest stretches within your runs, including stops. PR badges mark records set at the time of the run; your first effort establishes a record.

-
{% for record in record_book.records %}{{ record.label }}{{ record.seconds|duration }}{% else %}

Import a run with recorded distance and timestamps to establish your first record.

{% endfor %}
+
{% for record in record_book.records %}{{ record.label }}{{ pace_text(record.seconds * 1000 / record.distance) }}/km{% else %}

Import a run with recorded distance and timestamps to establish your first record.

{% endfor %}
{% endif %}
SESSION HISTORY

{{ 'Your activities' if personal else 'Shared activities' }}

{{ stats.count }} activities
{% include '_activities.html' %}
{% endblock %}