{{template "layout.html" .}}

{{define "title"}}{{ title .Name }}{{end}}

{{define "content"}}
<h1>{{ title .Name }}</h1>
{{ .Race }} {{ .Type }}

<h5>Sites</h5>
<table>
    {{- range .Sites }}
    <tr>
        <td class="object" style="vertical-align: top;"> {{ site . }}</td>
        <td> {{ template "events.html" events (history .) }}</td>
    </tr>
    {{- end }}
</table>
{{- if ne 0 (len .Sites) }}
{{- end }}

<h3>Events</h3>

{{ template "events.html" events . }}

<p>{{ json . }}</p>
{{- end }}