From eac1145e29e1a2a2ff5d9654ca010071a5840843 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 14 Aug 2026 15:23:48 +0200 Subject: feat: add official climb workflow --- web/templates.templ | 100 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 78 insertions(+), 22 deletions(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index 515c482..9ebeedb 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -57,35 +57,91 @@ templ RideDetailPage(data RideDetailView) { } templ RideDetailContent(data RideDetailView) { -

Ride detail

-

{ data.Ride.Name }

{ data.Ride.Type } · { formatRideDate(data.Ride.StartDate) }

+

{ data.Ride.Name }

{ data.Ride.Type } · { formatRideDate(data.Ride.StartDate) }

Back to rides
-
-
-
Distance
{ formatDistance(data.Ride.DistanceM) }
-
Moving time
{ formatDuration(data.Ride.MovingTimeS) }
-
Elevation
{ formatElevation(data.Ride.TotalElevationGainM) }
-
-
if data.RouteError != "" {
{ data.RouteError }
} - if data.HasRoute { -
-
-

Elevation profile

-

Hover or focus the profile to inspect the ride at that distance.

-
-
- + if data.Notice != "" { +
{ data.Notice }
+ } + if data.ActionError != "" { +
{ data.ActionError }
+ } +
+
+
+
+
Distance
{ formatDistance(data.Ride.DistanceM) }
+
Moving time
{ formatDuration(data.Ride.MovingTimeS) }
+
Elevation
{ formatElevation(data.Ride.TotalElevationGainM) }
+
+
+ if data.HasRoute { +
+ if len(data.Profile.Climbs) > 0 { + + } + if len(data.Profile.Climbs) == 0 { +

No climbs detected in this ride.

+ } + if len(data.Profile.Climbs) > 0 { +
+ for index, climb := range data.Profile.Climbs { +
+
+ Climb { formatClimbNumber(index) }{ climb.Name } + { formatProfileDistance(climb.StartKm) }–{ formatProfileDistance(climb.EndKm) } +
+

{ climb.Category } · { formatProfileDistance(climb.DistanceKm) } at { formatSlope(climb.SlopePercent) } · Cotacol { formatCotacol(climb.Cotacol) }

+ if climb.OfficialClimbID > 0 { +

Official climb matched: { climb.OfficialName }

+ } else { +

No official climb matched yet.

+
+ + + +
+
Start
{ formatProfileDistance(climb.StartKm) }
+
End
{ formatProfileDistance(climb.EndKm) }
+
+ Preview the corrected climb boundaries. + +
+ } +
+ } +
+ } +
+ } +
+ if data.HasRoute { +
+
+
+

Elevation profile

+

Hover or focus the profile to inspect the ride at that distance.

+
+
+ +
+ Hover or focus the profile to inspect elevation. +
+
+ +
- Hover or focus the profile to inspect elevation. -
-
- -
+ } + + if data.HasRoute { @templ.JSONScript("ride-route", data.Route) @templ.JSONScript("ride-profile", data.Profile) -- cgit v1.2.3