aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-01 15:44:10 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-01 15:44:10 +0200
commit28a7c9f281c16d1928b37dd1afdfe8399b7a03f8 (patch)
treeff6e5c551f1fa633e01faa1385d659e289e1b337 /web
parent7b6bd3ae858c5d7877f9ef137a3ff3d6f71ce1fc (diff)
Display Cotacol in the ride detail summary
Diffstat (limited to 'web')
-rw-r--r--web/server_test.go2
-rw-r--r--web/templates.templ1
2 files changed, 3 insertions, 0 deletions
diff --git a/web/server_test.go b/web/server_test.go
index 2e9a332..a07b7d9 100644
--- a/web/server_test.go
+++ b/web/server_test.go
@@ -161,6 +161,8 @@ func TestHandlerRendersRideDetailWithEmbeddedRoute(t *testing.T) {
assert.Contains(t, body, `id="ride-passes"`)
assert.Contains(t, body, `id="ride-profile-chart"`)
assert.Contains(t, body, `id="ride-map"`)
+ assert.Contains(t, body, `<div><dt>Cotacol</dt><dd>`)
+ assert.NotContains(t, body, `<div><dt>Cotacol</dt><dd>-</dd>`)
assert.Contains(t, body, `class="ride-detail-grid"`)
assert.Contains(t, body, `class="ride-detail-columns`)
assert.NotContains(t, body, "Climbs to match")
diff --git a/web/templates.templ b/web/templates.templ
index 5bf6b15..14f8d69 100644
--- a/web/templates.templ
+++ b/web/templates.templ
@@ -230,6 +230,7 @@ templ RideDetailContent(data RideDetailView) {
<div><dt>Moving time</dt><dd>{ data.MovingTime }</dd></div>
<div><dt>Speed</dt><dd>{ formatSpeed(data.Ride.AverageSpeedMps) }</dd></div>
<div><dt>Elevation</dt><dd>{ formatElevation(data.Ride.TotalElevationGainM) }</dd></div>
+ <div><dt>Cotacol</dt><dd>{ data.Cotacol }</dd></div>
</dl>
</section>
<section class="panel categories-panel">