diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-23 21:35:59 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-23 21:35:59 +0200 |
| commit | 08fdd6964fd9ef29356420b035e2d186546f674a (patch) | |
| tree | 812565b5ca57405a5b36b2d7edfab983f6f079d4 /web/templates.templ | |
| parent | 2d8503cafb9f63ca4cb63f041281987f9a63f16a (diff) | |
Add hardcore ride categorisation with bike and ride types
Diffstat (limited to 'web/templates.templ')
| -rw-r--r-- | web/templates.templ | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/web/templates.templ b/web/templates.templ index 9be2daf..d1719b8 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -180,6 +180,49 @@ templ RideDetailContent(data RideDetailView) { <div><dt>Elevation</dt><dd>{ formatElevation(data.Ride.TotalElevationGainM) }</dd></div> </dl> </section> + <section class="panel categories-panel"> + <div class="categories-layout"> + <div class="categories-heading"> + <p class="eyebrow">Curation</p> + <h2>Categories</h2> + </div> + <form method="post" action={ templ.URL(rideCategoriesUpdateURL(data.Ride.ID)) } class="category-form"> + <label for="ride-bike-type">Bike type + <select id="ride-bike-type" name="bike_type" required> + if data.Ride.BikeType == "" { + <option value="" selected>—</option> + } else { + <option value="">—</option> + } + for _, opt := range bikeTypeOptions { + if data.Ride.BikeType == opt { + <option value={ string(opt) } selected>{ bikeTypeLabels[opt] }</option> + } else { + <option value={ string(opt) }>{ bikeTypeLabels[opt] }</option> + } + } + </select> + </label> + <label for="ride-ride-type">Ride type + <select id="ride-ride-type" name="ride_type" required> + if data.Ride.RideType == "" { + <option value="" selected>—</option> + } else { + <option value="">—</option> + } + for _, opt := range rideTypeOptions { + if data.Ride.RideType == opt { + <option value={ string(opt) } selected>{ rideTypeLabels[opt] }</option> + } else { + <option value={ string(opt) }>{ rideTypeLabels[opt] }</option> + } + } + </select> + </label> + <button class="button" type="submit">Save</button> + </form> + </div> + </section> if data.HasRoute { if len(data.Profile.OfficialClimbs()) > 0 { <section class="panel official-climbs-panel"> |
