aboutsummaryrefslogtreecommitdiff
path: root/web/templates.templ
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 22:30:35 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 22:30:35 +0200
commit843fd11774531a4fd22456093b112506cbffbc18 (patch)
tree9e0148554bdf53be3896f6038904b89c54257b91 /web/templates.templ
parent4a61f3eb3103aa512bef1b0d82295403bc4bc977 (diff)
Add Strava external link to ride detail
Diffstat (limited to 'web/templates.templ')
-rw-r--r--web/templates.templ7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/templates.templ b/web/templates.templ
index 10008d2..db60ca9 100644
--- a/web/templates.templ
+++ b/web/templates.templ
@@ -207,7 +207,12 @@ templ RideDetailPage(data RideDetailView) {
templ RideDetailContent(data RideDetailView) {
<div class="toolbar">
<div><h1 class="ride-detail-title">{ data.Ride.Name }</h1><p class="lead">{ data.Ride.Type } ยท { formatRideDate(data.Ride.StartDate) }</p></div>
- <a class="button secondary" href="/">Back to rides</a>
+ <div class="toolbar-actions">
+ if data.ExternalURL != "" {
+ <a class="button secondary" href={ templ.URL(data.ExternalURL) } target="_blank" rel="noopener">View on Strava</a>
+ }
+ <a class="button secondary" href="/">Back to rides</a>
+ </div>
</div>
if data.RouteError != "" {
<div class="error">{ data.RouteError }</div>