You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
665 B
33 lines
665 B
package templates
|
|
|
|
import "track-gopher/models"
|
|
import "fmt"
|
|
|
|
templ FinalResultRow(result models.FinalResult) {
|
|
<tr class="reveal-animation">
|
|
<td>{ fmt.Sprintf("%d", result.Place) }</td>
|
|
<td>{ result.Racer.FirstName } { result.Racer.LastName }</td>
|
|
<td>{ result.Racer.CarNumber }</td>
|
|
<td>
|
|
<small>
|
|
for i, time := range result.Times {
|
|
if i > 0 {
|
|
,
|
|
}
|
|
if time >= 9.999 {
|
|
DNF
|
|
} else {
|
|
{ fmt.Sprintf("%.3f", time) }
|
|
}
|
|
}
|
|
</small>
|
|
</td>
|
|
<td>
|
|
if result.DNF {
|
|
<span class="text-danger">DNF</span>
|
|
} else {
|
|
<strong>{ fmt.Sprintf("%.3f", result.AverageTime) }</strong>
|
|
}
|
|
</td>
|
|
</tr>
|
|
} |