soccer-bot/main.tpl

45 lines
887 B
Smarty
Raw Normal View History

2017-08-08 16:32:45 +00:00
{{ 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 }}