aboutsummaryrefslogtreecommitdiff
path: root/web/templates.templ
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 08:05:58 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 08:05:58 +0200
commit1e8efcdb7e7747072e83bda3d4a7f0b3810a439d (patch)
tree3f60ac83771f6f899bd4b2313af3ae8bc6b68ae7 /web/templates.templ
parente73b7a9ccb4bc61e54d1fdc61b5954879c637d00 (diff)
Lint & fix
Diffstat (limited to 'web/templates.templ')
-rw-r--r--web/templates.templ6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/templates.templ b/web/templates.templ
index 6bf0154..8fbed0c 100644
--- a/web/templates.templ
+++ b/web/templates.templ
@@ -1,5 +1,7 @@
package web
+import "slices"
+
templ Layout(title string, content templ.Component) {
<!doctype html>
<html lang="en">
@@ -66,7 +68,7 @@ templ RidesContent(data RidesPageData) {
<legend>Ride type</legend>
<div class="ride-type-options">
for _, opt := range rideTypeOptions {
- <label class="ride-type-option"><input type="checkbox" name="ride_type" value={ string(opt) } checked?={ containsRideType(data.Filters.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
+ <label class="ride-type-option"><input type="checkbox" name="ride_type" value={ string(opt) } checked?={ slices.Contains(data.Filters.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
}
</div>
</fieldset>
@@ -136,7 +138,7 @@ templ AnalyticsContent(data AnalyticsPageData) {
<legend>Ride type</legend>
<div class="ride-type-options">
for _, opt := range rideTypeOptions {
- <label class="ride-type-option"><input type="checkbox" name="ride_type" value={ string(opt) } checked?={ containsRideType(data.Filter.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
+ <label class="ride-type-option"><input type="checkbox" name="ride_type" value={ string(opt) } checked?={ slices.Contains(data.Filter.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
}
</div>
</fieldset>