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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
{{ define "battleSingle" }}
{{ template "head" . }}
<body>
{{ template "nav" . }}
<span id="battle"></span>
<h1><a href="#battle">{{ .battle.Name }}</a></h1>
<pre>
<a href="#settings">Settings</a>
<a href="#elimination-ladder">Elimination Ladder</a>
<a href="#round-1">Round 1</a>
<a href="#round-2">Round 2</a>
<a href="#round-3">Round 3</a>
<a href="#current-standings">Current Standings</a>
</pre>
<span id="settings"></span>
<h2><a href="#settings">Settings</a></h2>
<form id="delete" method="POST" action="/battle/{{ .battle.ID }}/delete">
</form>
<table>
<form id="battle" method="POST" action="/battle/{{ .battle.ID }}">
<tr>
<td><label for="name">Name:</label></td>
<td><input class="border" type="text" id="name" name="name" value="{{ .battle.Name }}"></td>
</tr>
<tr>
<td><label for="latestBotSubmission">Latest Bot Submission</label></td>
<td><input
class="border"
type="datetime-local"
id="latestBotSubmission"
name="latestBotSubmission"
value="2024-11-08T12:00"
></td>
</tr>
<tr>
<td><label for="battleStart">Battle Start</label></td>
<td><input
class="border"
type="datetime-local"
id="battleStart"
name="battleStart"
value="2024-11-08T16:00"
></td>
</tr>
<!--
<tr>
<td><label for="owners">Owners:</label></td>
<td>
{{ range $idx, $usr := .battle.Owners }}{{if $idx}},{{end}}<a href="/user/{{ $usr.ID }}">{{ $usr.Name }}</a>{{ end }}
</td>
</tr>
<tr>
<td><label for="bots">Bots:</label></td>
<td>
{{ range $idx, $bot := .battle.Bots }}{{if $idx}},{{end}}<a href="/bot/{{ $bot.ID }}">{{ $bot.Name }}</a>{{ end }}
</td>
</tr>
-->
<tr>
<td><label for="public">Public?</label></td>
<td><input type="checkbox" id="public" name="public" {{ if .battle.Public }}checked{{end}}/></td>
</tr>
<tr>
<td>Archs</td>
<td>
{{ range $idx, $arch := .archs }}{{if $idx}},{{end}}
<input
type="checkbox"
class="check-with-label"
name="arch-{{$arch.ID}}"
id="arch-{{$arch.ID}}"
{{if $arch.Enabled}}checked{{end}}/>
<label class="label-for-check" for="arch-{{$arch.ID}}">{{$arch.Name}}</label>
{{- end }}
</td>
</td>
<tr>
<td>Bits</td>
<td>{{ range $idx, $bit := .bits }}{{if $idx}},{{end}}
<input
type="checkbox"
class="check-with-label"
id="bit-{{$bit.ID}}"
name="bit-{{$bit.ID}}"
{{if $bit.Enabled}}checked{{end}}/>
<label class="label-for-check" for="bit-{{$bit.ID}}">{{$bit.Name}}</label>
{{- end }}
</td>
</td>
<tr>
<td></td>
<td>
<table>
<tr>
<td style="width: 33%;"><input class="border" type="submit" value="Save"></td>
<td style="width: 33%;"></td>
<td style="width: 33%; ">
<input type="submit" value="Delete this battle" form="delete" style="border: 1px solid red; ">
</td>
</tr>
</table>
</td>
</tr>
</form>
{{ if .res }}
<tr>
<td></td>
<td>{{ .res }}</td>
</tr>
{{ end }}
<tr>
<td><br><hr><br></td>
<td><br><hr><br></td>
</tr>
{{ if .myBots }}
<form method="POST" action="/battle/{{ .battle.ID }}/submit">
<tr>
<td><label for="name">My Bots</label></td>
<td style="width: 100%;">
<table class="trhover">
{{ range $bot := .myBots }}
<tr>
<td style="text-align: center; vertical-align: middle; width: 2ex;">
<input
type="checkbox"
id="bot-{{$bot.ID}}"
name="bot-{{$bot.ID}}"
value="{{$bot.ID}}" />
</td>
<td style="vertical-align: middle">
<label for="bot-{{$bot.ID}}">
<a href="/bot/{{$bot.ID}}">{{$bot.Name}}</a>
</label>
</td>
</tr>
{{ end }}
</table>
</td>
</tr>
<tr>
<td></td>
<td><input class="border" type="submit" value="Submit"></td>
</tr>
</form>
{{ else }}
<tr>
<td></td>
<td><a href='/bot/new'>Upload a bot</a> to get started!</td>
</tr>
{{ end }}
<table>
<span id="elimination-ladder"></span>
<h2><a href="#elimination-ladder">Elimination Ladder</a></h2>
<span id="round-1"></span>
<h3><a href="#round-1">Round 1</a></h2>
<br><a href="">Round 1.1</a>: <a href="">bot1</a> vs <a href="">bot2</a>
<br><a href="">Round 1.2</a>: <a href="">bot3</a> vs <a href="">bot4</a>
<br>
<br><a href="">Round 1.3</a>: <a href="">bot1</a> vs <a href="">bot2</a>
<br><a href="">Round 1.4</a>: <a href="">bot3</a> vs <a href="">bot4</a>
<span id="round-2"></span>
<h3><a href="#round-2">Round 2</a></h2>
<br><a href="">Round 2.1</a>: winner of <a href="">round 1.1</a> vs winner of <a href="">round 1.2</a>
<br><a href="">Round 2.2</a>: winner of <a href="">round 1.3</a> vs winner of <a href="">round 1.4</a>
<span id="round-3"></span>
<h3><a href="#round-3">Round 3</a></h2>
<br><a href="">Round 3.1</a>: winner of <a href="">round 2.1</a> vs winner of <a href="">round 2.2</a>
<span id="current-standings"></span>
<h2><a href="#current-standings">Current Standings</a></h2>
<p>There are {{ .botAmount }} Bots in this battle, as we're executing each battle two times with all permutations, we're executing {{ .battleCount }} battles.</p>
<br>What is Lorem Ipsum?
<br>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<br>Why do we use it?
<br>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
<br>Where does it come from?
<br>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
<br>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
<br>Where can I get some?
<br>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
<br>Where can I get some?
<br>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
<br>Where can I get some?
<br>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
<br>Where can I get some?
<br>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
</body>
{{ template "footer" . }}
{{ end }}
|