diff options
Diffstat (limited to 'web/views.go')
| -rw-r--r-- | web/views.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/views.go b/web/views.go index 5dfc0e6..af3dbc2 100644 --- a/web/views.go +++ b/web/views.go @@ -448,6 +448,14 @@ func formatElevation(meters float64) string { return fmt.Sprintf("%.0f m", meters) } +// formatPower renders an attempt's average power; a missing power meter shows "-". +func formatPower(watts *float64) string { + if watts == nil { + return "-" + } + return fmt.Sprintf("%.0f W", *watts) +} + func formatCotacol(cotacol float64) string { return fmt.Sprintf("%.1f", cotacol) } @@ -488,6 +496,10 @@ func officialProfileLabel(name string) string { return "Elevation profile for " + name } +func attemptsChartLabel(name string) string { + return "Power vs time of recorded attempts at " + name +} + func rideDetailColumnsClass(unmatchedClimbCount int) string { if unmatchedClimbCount == 0 { return "ride-detail-columns ride-detail-columns-single" |
