about summary refs log tree commit diff
path: root/templates/battles.html
blob: bdc4d4b8517d90e2a3bd720e07d32ffe3fdd85be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{{ define "battles" }}

{{ template "head" . }}
<body>
  {{ template "nav" . }}

  <span id="allbattles"></span>
  <h1><a href="#allbattles">All Battles</a></h1>

  <p>A battle is a collection of matches. It plays through all matches in the elimination ladder in order to determine an overall winner.</p>
  <br>

  <table class="trhover">
  {{ range $battle := .battles }}
    <tr>
      <td>
        - <a href="/battle/{{ $battle.ID }}">{{ $battle.Name }}</a>
      </td>
      <td>
        {{ range $idx, $bot := $battle.Bots }}{{if $idx}},{{end}}<a href="/user/{{ $bot.ID }}">{{ $bot.Name }}</a>{{ end }}
      </td>
    </tr>
  {{ end }}
  </table>
</body>
{{ template "footer" . }}
{{ end }}