aboutsummaryrefslogtreecommitdiff
path: root/templates/world_list.tmpl
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-08-01 19:48:26 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-08-01 19:48:26 -0300
commitd84651a899a6104fce73d95b9c571627c55e5d16 (patch)
treebbaf7f7646dec22dc9fdb0f136d5ba5534b1fddf /templates/world_list.tmpl
downloadweb-d84651a899a6104fce73d95b9c571627c55e5d16.tar.gz
web-d84651a899a6104fce73d95b9c571627c55e5d16.zip
bare bones website
Diffstat (limited to 'templates/world_list.tmpl')
-rw-r--r--templates/world_list.tmpl23
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/world_list.tmpl b/templates/world_list.tmpl
new file mode 100644
index 0000000..de9786c
--- /dev/null
+++ b/templates/world_list.tmpl
@@ -0,0 +1,23 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ <h1>Worlds</h1>
+ {{if .Worlds}}
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Players Online</th>
+ </tr>
+ {{range .Worlds}}
+ <tr>
+ <td><a href="/world?name={{.Name}}">{{.Name}}</a></td>
+ <td>{{.Type}}</td>
+ <td>{{.NumPlayers}}</td>
+ </tr>
+ {{end}}
+ </table>
+ {{else}}
+ <p>Something went wrong when loading world data. Wait a few moments and try again.</p>
+ {{end}}
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file