From 077aa1700fbcaf3f499c2178e0e58e89ae9dcaf8 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 25 Sep 2026 08:46:58 +0200 Subject: Chart power vs time for official climb attempts Snapshot average power per attempt in a nullable average_power_w column (backfilled from stored rides), plot each powered attempt on the climb page as duration vs average watts with ride hover and click-through, and show avg power in the attempts table. --- web/templates.templ | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index aceeeee..6a0109f 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -563,19 +563,25 @@ templ ClimbDetailContent(data ClimbDetailPageData) { if len(data.Attempts) == 0 {
No attempts recorded yet. Open a ride containing this climb to record one.
} else { + if len(data.AttemptPoints) > 0 { +
+ Hover a point to inspect an attempt. + } - + for _, attempt := range data.Attempts { - + }
DateRideTimeDistanceCotacol
DateRideTimeAvg powerDistanceCotacol
{ attempt.Date }{ attempt.RideName }{ attempt.Duration }{ attempt.Distance }{ attempt.Cotacol }
{ attempt.Date }{ attempt.RideName }{ attempt.Duration }{ formatPower(attempt.AveragePowerW) }{ attempt.Distance }{ attempt.Cotacol }
} @templ.JSONScript("climb-profile-data", data.Profile) + @templ.JSONScript("climb-attempt-points", data.AttemptPoints) @templ.JSONScript("climb-endpoints", data.Endpoints) + } -- cgit v1.3