about summary refs log tree commit diff
path: root/templates/battles.html
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-08-16 19:50:26 +0200
committerEmile <git@emile.space>2024-08-16 19:50:26 +0200
commit1a57267a17c2fc17fb6e104846fabc3e363c326c (patch)
tree1e574e3a80622086dc3c81ff9cba65ef7049b1a9 /templates/battles.html
initial commit
Diffstat (limited to 'templates/battles.html')
-rw-r--r--templates/battles.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/battles.html b/templates/battles.html
new file mode 100644
index 0000000..bdc4d4b
--- /dev/null
+++ b/templates/battles.html
@@ -0,0 +1,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 }}