aboutsummaryrefslogtreecommitdiff
path: root/web/templates.templ
diff options
context:
space:
mode:
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>