aboutsummaryrefslogtreecommitdiff
path: root/web/templates.templ
blob: 14f8d691c63e150f7553b6f5d72737872bf31dc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466

package web

import "slices"

templ Layout(title string, content templ.Component) {
	<!doctype html>
	<html lang="en">
		<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1"/>
		<title>{ title } · biking_home</title>
		<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
		<link rel="stylesheet" href="/static/style.css"/>
		</head>
		<body>
			<header class="site-header">
				<a class="brand" href="/">biking_home</a>
				<nav class="nav"><a href="/">Rides</a><a href="/analytics">Analytics</a><a href="/data-quality">Data quality</a><a href="/sync">Sync Strava</a></nav>
			</header>
			<main class="container">
				@content
			</main>
		</body>
	</html>
}

templ RidesPage(data RidesPageData) {
	@Layout("Rides", RidesContent(data))
}

templ RidesContent(data RidesPageData) {
	<p class="eyebrow">Ride library</p>
	<section class="panel ride-filters-panel">
		<form id="ride-filters" class="ride-filters" method="get" action="/" aria-label="Ride filters">
			<div class="section-heading">
				<div><p class="eyebrow">Refine</p><h2>Filter rides</h2></div>
				<div class="ride-filter-actions"><button class="button" type="submit">Apply filters</button><a class="button secondary" href={ templ.URL(data.Filters.ResetURL) }>Reset</a></div>
			</div>
			<input type="hidden" name="sort" value={ data.Sort.Column }/>
			<input type="hidden" name="dir" value={ rideSortDirection(data.Sort) }/>
			<div class="ride-filter-ranges">
				@RideRangeFilter(rideDistanceFilterConfig(data.Filters))
				@RideRangeFilter(rideDurationFilterConfig(data.Filters))
				@RideRangeFilter(rideCotacolFilterConfig(data.Filters))
			</div>
			<div class="ride-filter-meta">
				<fieldset class="ride-filter-group date-filter-group">
					<legend>Started</legend>
					<div class="date-filter-inputs"><label for="ride-date-from">From<input id="ride-date-from" type="date" name="date_from" value={ data.Filters.DateFrom }/></label><label for="ride-date-to">To<input id="ride-date-to" type="date" name="date_to" value={ data.Filters.DateTo }/></label></div>
				</fieldset>
				<label for="ride-bike-type-filter">Bike
					<select id="ride-bike-type-filter" name="bike_type">
						if data.Filters.BikeType == "" {
							<option value="" selected>Any bike</option>
						} else {
							<option value="">Any bike</option>
						}
						for _, opt := range bikeTypeOptions {
							if data.Filters.BikeType == string(opt) {
								<option value={ string(opt) } selected>{ bikeTypeLabels[opt] }</option>
							} else {
								<option value={ string(opt) }>{ bikeTypeLabels[opt] }</option>
							}
						}
					</select>
				</label>
				<fieldset class="ride-filter-group">
					<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?={ slices.Contains(data.Filters.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
						}
					</div>
				</fieldset>
			</div>
		</form>
	</section>
	<section class="panel">
		if len(data.Items) == 0 {
			if data.Filters.Active {
				<div class="empty">No rides match the selected filters. <a href={ templ.URL(data.Filters.ResetURL) }>Clear filters.</a></div>
			} else {
				<div class="empty">No rides stored yet. <a href="/sync">Import your first Strava rides.</a></div>
			}
		} else {
			<table>
				<thead><tr>
					for _, header := range data.Headers {
						<th class={ header.Class } scope="col" aria-sort={ header.AriaSort }><a class="sort-link" href={ templ.URL(header.URL) }>{ header.Label }<span class="sort-indicator" aria-hidden="true">{ header.Indicator }</span></a></th>
					}
				</tr></thead>
				<tbody>
					for _, item := range data.Items {
						<tr><td><strong><a href={ templ.URL(rideDetailURL(item.Ride.ID)) }>{ item.Ride.Name }</a></strong><br/><small>{ formatRideCategories(item.Ride) }</small></td><td>{ formatRideDate(item.Ride.StartDate) }</td><td class="numeric">{ formatDistance(item.Ride.DistanceM) }</td><td class="numeric">{ item.MovingTime }</td><td class="numeric">{ formatSpeed(item.Ride.AverageSpeedMps) }</td><td class="numeric">{ formatElevation(item.Ride.TotalElevationGainM) }</td><td class="numeric">{ item.Cotacol }</td><td class="numeric">{ item.CotacolPer100Km }</td></tr>
					}
				</tbody>
			</table>
		}
	</section>
	<script type="module" src="/static/ride-filters.js"></script>
}

templ AnalyticsPage(data AnalyticsPageData) {
	@Layout("Analytics", AnalyticsContent(data))
}

templ AnalyticsContent(data AnalyticsPageData) {
	<p class="eyebrow">Analytics</p>
	<h1>Ride analytics</h1>
	<p class="lead">One point per ride — first chart: average speed vs. Cotacol per 100 km; second chart: normalized difficulty (Cotacol per 100 km) vs. moving duration.</p>
	<section class="panel analytics-filters-panel">
		<form id="analytics-filters" class="ride-filters" method="get" action="/analytics" aria-label="Analytics filters">
			<div class="section-heading">
				<div><p class="eyebrow">Refine</p><h2>Analyses</h2></div>
				<div class="ride-filter-actions"><button class="button" type="submit">Apply filters</button><a class="button secondary" href={ templ.URL(data.Filter.ResetURL) }>Reset</a></div>
			</div>
			<div class="ride-filter-ranges">
				@RideRangeFilter(rideDistanceFilterConfig(data.Filter))
			</div>
			<div class="ride-filter-meta">
				<label for="analytics-bike-type">Bike
					<select id="analytics-bike-type" name="bike_type">
						if data.Filter.BikeType == "" {
							<option value="" selected>Any bike</option>
						} else {
							<option value="">Any bike</option>
						}
						for _, opt := range bikeTypeOptions {
							if data.Filter.BikeType == string(opt) {
								<option value={ string(opt) } selected>{ bikeTypeLabels[opt] }</option>
							} else {
								<option value={ string(opt) }>{ bikeTypeLabels[opt] }</option>
							}
						}
					</select>
				</label>
				<fieldset class="ride-filter-group">
					<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?={ slices.Contains(data.Filter.RideTypes, opt) }/><span>{ rideTypeLabels[opt] }</span></label>
						}
					</div>
				</fieldset>
			</div>
		</form>
	</section>
	<section class="panel analytics-colorby-panel">
		<div class="section-heading">
			<div><p class="eyebrow">View</p><h2>Color points by</h2></div>
		</div>
		<label class="analytics-colorby" for="analytics-color-by">Split points by
			<select id="analytics-color-by">
				<option value="none" selected>None</option>
				<option value="year">Year</option>
				<option value="rideType">Ride type</option>
				<option value="bikeType">Bike type</option>
			</select>
		</label>
		<ul id="analytics-legend" class="analytics-legend" hidden></ul>
	</section>
	<section class="panel analytics-panel">
		<div class="section-heading">
			<div><p class="eyebrow">Chart</p><h2>Speed vs. Cotacol per 100 km</h2></div>
			if len(data.Points) > 0 {
				<span class="section-count" data-analytics-count>{ formatRideCount(len(data.Points)) }</span>
			}
		</div>
		if len(data.Points) == 0 {
			if data.Filter.Active {
				<div class="empty">No rides match the selected filters. <a href={ templ.URL(data.Filter.ResetURL) }>Clear filters.</a></div>
			} else {
				<div class="empty">No eligible rides yet. <a href="/sync">Import rides to see the chart.</a></div>
			}
		} else {
			<div class="analytics-chart"><canvas id="analytics-chart" tabindex="0" role="img" aria-label="Scatter plot of ride average speed against Cotacol per 100 km"></canvas></div>
			<output id="analytics-hover" class="analytics-hover" aria-live="polite">Hover a point to inspect a ride.</output>
		}
	</section>
	<section class="panel analytics-panel">
		<div class="section-heading">
			<div><p class="eyebrow">Chart</p><h2>Normalized difficulty vs moving duration</h2></div>
			if len(data.Points) > 0 {
				<span class="section-count" data-analytics-duration-count>{ formatRideCount(len(data.Points)) }</span>
			}
		</div>
		if len(data.Points) == 0 {
			if data.Filter.Active {
				<div class="empty">No rides match the selected filters. <a href={ templ.URL(data.Filter.ResetURL) }>Clear filters.</a></div>
			} else {
				<div class="empty">No eligible rides yet. <a href="/sync">Import rides to see the chart.</a></div>
			}
		} else {
			<div class="analytics-chart"><canvas id="analytics-duration-chart" tabindex="0" role="img" aria-label="Scatter plot of normalized difficulty against moving duration"></canvas></div>
			<output id="analytics-duration-hover" class="analytics-hover" aria-live="polite">Hover a point to inspect a ride.</output>
		}
	</section>
	@templ.JSONScript("analytics-points", data.Points)
	<script type="module" src="/static/ride-filters.js"></script>
	<script type="module" src="/static/analytics.js"></script>
}

templ RideDetailPage(data RideDetailView) {
	@Layout("Ride detail", RideDetailContent(data))
}

templ RideDetailContent(data RideDetailView) {
	<div class="toolbar">
		<div><h1 class="ride-detail-title">{ data.Ride.Name }</h1><p class="lead">{ formatRideCategories(data.Ride) } · { formatRideDate(data.Ride.StartDate) }</p></div>
		<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>
	}
	if data.Notice != "" {
		<div class="notice">{ data.Notice }</div>
	}
	if data.ActionError != "" {
		<div class="error">{ data.ActionError }</div>
	}
	<div class="ride-detail-grid">
		<section class="panel summary-panel">
			<dl>
				<div><dt>Distance</dt><dd>{ formatDistance(data.Ride.DistanceM) }</dd></div>
				<div><dt>Moving time</dt><dd>{ data.MovingTime }</dd></div>
				<div><dt>Speed</dt><dd>{ formatSpeed(data.Ride.AverageSpeedMps) }</dd></div>
				<div><dt>Elevation</dt><dd>{ formatElevation(data.Ride.TotalElevationGainM) }</dd></div>
				<div><dt>Cotacol</dt><dd>{ data.Cotacol }</dd></div>
			</dl>
		</section>
		<section class="panel categories-panel">
			<details class="categories-details" open?={ data.Ride.BikeType == "" && data.Ride.RideType == "" }>
				<summary class="categories-summary">
					<div class="categories-heading">
						<p class="eyebrow">Curation</p>
						<h2>Categories</h2>
					</div>
					<span class="categories-chevron" aria-hidden="true">⌄</span>
				</summary>
				<form method="post" action={ templ.URL(rideCategoriesUpdateURL(data.Ride.ID)) } class="category-form">
					<fieldset class="category-fieldset">
						<legend>Bike type</legend>
						<div class="category-options">
							for _, opt := range bikeTypeOptions {
								<label class="category-option"><input type="radio" name="bike_type" value={ string(opt) } required checked?={ data.Ride.BikeType == opt }/><span>{ bikeTypeLabels[opt] }</span></label>
							}
						</div>
					</fieldset>
					<fieldset class="category-fieldset">
						<legend>Ride type</legend>
						<div class="category-options">
							for _, opt := range rideTypeOptions {
								<label class="category-option"><input type="radio" name="ride_type" value={ string(opt) } required checked?={ data.Ride.RideType == opt }/><span>{ rideTypeLabels[opt] }</span></label>
							}
						</div>
					</fieldset>
					<button class="button" type="submit">Save</button>
				</form>
			</details>
		</section>
		if data.HasRoute {
			if len(data.Profile.OfficialClimbs()) > 0 {
				<section class="panel official-climbs-panel">
					<div class="section-heading">
						<p class="eyebrow">Official climbs</p>
					</div>
					<div class="official-climb-list">
						for _, climb := range data.Profile.OfficialClimbs() {
							<details class="official-climb-card" data-official-climb-card>
								<summary>
									<span class="official-climb-card-title"><span class="climb-number">Climb { formatClimbNumber(climb.Index) }</span><strong>{ climb.OfficialName }</strong></span>
									<dl class="official-climb-summary-stats">
										<div><dt>Length</dt><dd>{ formatProfileDistance(climb.DistanceKm) }</dd></div>
										<div><dt>Cotacol</dt><dd>{ formatCotacol(climb.Cotacol) }</dd></div>
										<div><dt>Avg slope</dt><dd>{ formatSlope(climb.SlopePercent) }</dd></div>
									</dl>
									<span class="official-climb-chevron" aria-hidden="true">⌄</span>
								</summary>
								<div class="official-climb-card-body">
									<canvas class="official-climb-profile" data-official-profile data-profile-start={ formatRouteIndex(climb.StartIndex) } data-profile-end={ formatRouteIndex(climb.EndIndex) } tabindex="0" role="img" aria-label={ officialProfileLabel(climb.OfficialName) }></canvas>
									<div class="official-climb-profile-legend" role="list" aria-label="Average slope color scale">
										<span role="listitem"><i class="profile-band-swatch profile-band-downhill" aria-hidden="true"></i>&lt;=0%</span>
										<span role="listitem"><i class="profile-band-swatch profile-band-0-3" aria-hidden="true"></i>0–3%</span>
										<span role="listitem"><i class="profile-band-swatch profile-band-3-6" aria-hidden="true"></i>3–6%</span>
										<span role="listitem"><i class="profile-band-swatch profile-band-6-9" aria-hidden="true"></i>6–9%</span>
										<span role="listitem"><i class="profile-band-swatch profile-band-9-plus" aria-hidden="true"></i>9%+</span>
									</div>
								</div>
							</details>
						}
					</div>
				</section>
			}
			<div class={ rideDetailColumnsClass(len(data.Profile.UnmatchedClimbs())) }>
				if len(data.Profile.UnmatchedClimbs()) > 0 {
				<section class="panel climbs-panel">
					<div class="section-heading">
						<div><p class="eyebrow">Next steps</p><h2>Climbs to match</h2></div>
						<span class="section-count">{ formatClimbCount(len(data.Profile.UnmatchedClimbs())) }</span>
					</div>
					<nav class="climb-navigation" aria-label="Climb navigation">
						<button class="button secondary" type="button" data-climb-previous aria-label="Previous climb">←</button>
						<output data-climb-position>Climb 1 of { formatClimbCount(len(data.Profile.UnmatchedClimbs())) }</output>
						<button class="button secondary" type="button" data-climb-next aria-label="Next climb">→</button>
					</nav>
					<div class="climb-list" data-climb-list>
						for _, climb := range data.Profile.UnmatchedClimbs() {
							<article class="climb-item" data-climb-item data-climb-index={ formatRouteIndex(climb.Index) }>
								<div class="climb-item-heading">
									<strong><span class="climb-number">Climb { formatClimbNumber(climb.Index) }</span>{ climb.Name }</strong>
									<span class="climb-range" data-climb-summary>{ formatProfileDistance(climb.StartKm) }–{ formatProfileDistance(climb.EndKm) }</span>
								</div>
								<p class="climb-metrics" data-climb-metrics>{ climb.Category } · { formatProfileDistance(climb.DistanceKm) } at { formatSlope(climb.SlopePercent) } · Cotacol { formatCotacol(climb.Cotacol) }</p>
									<p class="climb-status">Waiting for an official climb match.</p>
									<form class="official-climb-form" data-official-climb-form method="post" action={ templ.URL(officialClimbCreateURL(data.Ride.ID)) }>
										<label>Name<input type="text" name="name" required placeholder="Official climb name"/></label>
										<input type="hidden" name="start_index" value={ formatRouteIndex(climb.StartIndex) } data-boundary-input="start"/>
									<input type="hidden" name="end_index" value={ formatRouteIndex(climb.EndIndex) } data-boundary-input="end"/>
									<div class="boundary-controls">
										<div><strong>Start</strong><button class="button secondary" type="button" data-boundary-button="start" data-boundary-source="profile" aria-label="Select on profile for start">Profile</button><button class="button secondary" type="button" data-boundary-button="start" data-boundary-source="map" aria-label="Select on map for start">Map</button><output data-boundary-output="start">{ formatProfileDistance(climb.StartKm) }</output></div>
										<div><strong>End</strong><button class="button secondary" type="button" data-boundary-button="end" data-boundary-source="profile" aria-label="Select on profile for end">Profile</button><button class="button secondary" type="button" data-boundary-button="end" data-boundary-source="map" aria-label="Select on map for end">Map</button><output data-boundary-output="end">{ formatProfileDistance(climb.EndKm) }</output></div>
									</div>
										<output class="boundary-preview" data-boundary-preview>Preview the corrected climb boundaries.</output>
										<button class="button" type="submit">Save official climb</button>
									</form>
								</article>
						}
					</div>
				</section>
				}
				<div class="ride-detail-main">
				<section class="panel profile-panel">
					<div class="profile-heading">
						<h2>Elevation profile</h2>
						<p>Hover or focus the profile to inspect the ride at that distance.</p>
					</div>
					<div class="profile-chart">
						<canvas id="ride-profile-chart" tabindex="0" role="img" aria-describedby="ride-profile-hover" aria-label="Interactive ride elevation profile"></canvas>
					</div>
					<output id="ride-profile-hover" class="profile-hover" aria-live="polite">Hover or focus the profile to inspect elevation.</output>
				</section>
				<section class="panel map-panel">
					<div id="ride-map" class="ride-map" role="img" aria-label="Recorded ride route map"></div>
				</section>
				</div>
			</div>
		}
	</div>
	if data.HasRoute {
		@templ.JSONScript("ride-route", data.Route)
		@templ.JSONScript("ride-profile", data.Profile)
		@templ.JSONScript("ride-passes", data.Passes)
        <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
        <script type="module" src="/static/ride-detail.js"></script>
	}
}

templ SyncPage(data SyncPageData) {
	@Layout("Sync Strava", SyncContent(data))
}

templ SyncContent(data SyncPageData) {
	<p class="eyebrow">Data import</p>
	<h1>Sync Strava rides</h1>
	<p class="lead">Choose a date range. New rides are downloaded as GPX files and recorded in the local library.</p>
	if data.Notice != "" {
		<div id="sync-notice" class="notice">{ data.Notice }</div>
	} else {
		<div id="sync-notice" class="notice" hidden></div>
	}
	if data.Error != "" {
		<div id="sync-error" class="error">{ data.Error }</div>
	} else {
		<div id="sync-error" class="error" hidden></div>
	}
	<section class="panel">
		if !data.HasAuth {
			<p>Strava authorization is required before the first sync.</p>
			<a class="button secondary" href={ templ.URL("/strava/login?return_to=/sync") }>Authorize Strava</a>
		} else {
			<form id="sync-form" method="post" action="/sync">
				<div class="form-row">
					<label>From<input type="date" name="from" value={ data.From } required/></label>
					<label>To<input type="date" name="to" value={ data.To } required/></label>
					<button class="button" type="submit">Sync rides</button>
				</div>
			</form>
			<div id="sync-progress" class="sync-progress" role="status" aria-live="polite" hidden>
				<div class="progress-heading"><strong>Importing rides</strong><span id="sync-progress-count">0 / 0</span></div>
				<progress id="sync-progress-bar" max="1" value="0" aria-label="Strava import progress"></progress>
				<span id="sync-progress-details">0 imported · 0 skipped</span>
			</div>
		}
	</section>
	<script type="module" src="/static/sync.js"></script>
}

templ DataQualityPage(data DataQualityPageData) {
	@Layout("Data quality", DataQualityContent(data))
}

templ DataQualityContent(data DataQualityPageData) {
	<p class="eyebrow">Curation</p>
	<h1>Data quality</h1>
	<p class="lead">Categorise rides that are missing bike or ride type. Select rides, pick categories, and apply in bulk.</p>
	if data.Notice != "" {
		<div class="notice">{ data.Notice }</div>
	}
	<section class="panel">
		<div class="section-heading">
			<div><p class="eyebrow">Todo</p><h2>Uncategorised rides</h2></div>
			<span class="section-count">{ formatRideCount(data.Total) }</span>
		</div>
		if data.Total == 0 {
			<div class="empty">All rides are categorised.</div>
		} else if len(data.Items) == 0 {
			<div class="empty">No uncategorised rides match the current view.</div>
		} else {
			<form method="post" action="/data-quality/categories" id="data-quality-form">
				<div class="data-quality-bulk">
					<label for="bulk-bike-type">Bike type
						<select id="bulk-bike-type" name="bike_type" required>
							<option value="">—</option>
							for _, opt := range bikeTypeOptions {
								<option value={ string(opt) }>{ bikeTypeLabels[opt] }</option>
							}
						</select>
					</label>
					<label for="bulk-ride-type">Ride type
						<select id="bulk-ride-type" name="ride_type" required>
							<option value="">—</option>
							for _, opt := range rideTypeOptions {
								<option value={ string(opt) }>{ rideTypeLabels[opt] }</option>
							}
						</select>
					</label>
					<button class="button" type="submit">Apply to selected</button>
					<span class="data-quality-selected" id="data-quality-selected">0 selected</span>
				</div>
				<div class="data-quality-table-wrap">
					<table>
						<thead><tr><th><input type="checkbox" id="data-quality-select-all" aria-label="Select all rides"/></th><th>Ride</th><th>Started</th><th class="numeric">Distance</th><th>Bike</th><th>Ride type</th></tr></thead>
						<tbody>
							for _, item := range data.Items {
								<tr>
									<td><input type="checkbox" name="ride_ids" value={ formatRideID(item.Ride.ID) } class="data-quality-checkbox"/></td>
									<td><strong><a href={ templ.URL(rideDetailURL(item.Ride.ID)) }>{ item.Ride.Name }</a></strong><br/><small>{ formatRideCategories(item.Ride) }</small></td>
									<td>{ formatRideDate(item.Ride.StartDate) }</td>
									<td class="numeric">{ formatDistance(item.Ride.DistanceM) }</td>
									<td>{ formatCategoryOrEmpty(string(item.Ride.BikeType)) }</td>
									<td>{ formatCategoryOrEmpty(string(item.Ride.RideType)) }</td>
								</tr>
							}
						</tbody>
					</table>
				</div>
			</form>
			<script type="module" src="/static/data-quality.js"></script>
		}
	</section>
}