45 lines
887 B
Smarty
45 lines
887 B
Smarty
|
{{ define "error" }}
|
||
|
{{ bold -}}
|
||
|
{{ color 4 -}}
|
||
|
ERROR:
|
||
|
{{- reset }}
|
||
|
|
||
|
{{ . }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ define "match" }}
|
||
|
{{/*
|
||
|
Date time.Time
|
||
|
Status FixtureStatus = "IN_PLAY" | "FINISHED" | "TIMED"
|
||
|
Matchday uint16
|
||
|
HomeTeamName string
|
||
|
AwayTeamName string
|
||
|
Result FixtureResult
|
||
|
{
|
||
|
GoalsHomeTeam uint16
|
||
|
GoalsAwayTeam uint16
|
||
|
}
|
||
|
*/}}
|
||
|
|
||
|
{{ if or (eq .Status "IN_PLAY") (eq .Status "FINISHED") }}
|
||
|
{{ bold }}{{ .HomeTeamName }}{{ bold }}
|
||
|
{{ .Result.GoalsHomeTeam -}}
|
||
|
:
|
||
|
{{- .Result.GoalsAwayTeam }}
|
||
|
{{ bold }}{{ .AwayTeamName }}{{ bold }}
|
||
|
{{ else }}
|
||
|
{{ bold }}{{ .HomeTeamName }}{{ bold }}
|
||
|
vs
|
||
|
{{ bold }}{{ .AwayTeamName }}{{ bold }}
|
||
|
{{ end }}
|
||
|
|
|
||
|
{{ if eq .Status "IN_PLAY" }}
|
||
|
{{ playtime .Date }}
|
||
|
{{ else }}
|
||
|
{{ if eq .Status "FINISHED" }}
|
||
|
Match finished
|
||
|
{{ else }}
|
||
|
Match starts {{ ago .Date }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|