aboutsummaryrefslogtreecommitdiff
path: root/templates/world_info.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_info.tmpl
downloadweb-d84651a899a6104fce73d95b9c571627c55e5d16.tar.gz
web-d84651a899a6104fce73d95b9c571627c55e5d16.zip
bare bones website
Diffstat (limited to 'templates/world_info.tmpl')
-rw-r--r--templates/world_info.tmpl62
1 files changed, 62 insertions, 0 deletions
diff --git a/templates/world_info.tmpl b/templates/world_info.tmpl
new file mode 100644
index 0000000..c0f9c24
--- /dev/null
+++ b/templates/world_info.tmpl
@@ -0,0 +1,62 @@
+{{template "_header.tmpl" .Common}}
+ <div class="box">
+ <h1>World Information</h1>
+ {{with .World}}
+ <table class="info">
+ <tr>
+ <th>Name:</th>
+ <td>{{.Name}}</td>
+ </tr>
+ <tr>
+ <th>Type:</th>
+ <td>{{.Type}}</td>
+ </tr>
+ <tr>
+ <th>Players Online:</th>
+ <td>{{.NumPlayers}}</td>
+ </tr>
+ <tr>
+ <th>Online Record:</th>
+ {{if .OnlineRecord}}
+ <td>{{.OnlineRecord}} players (on {{.OnlineRecordTime}})</td>
+ {{else}}
+ <td>None</td>
+ {{end}}
+ </tr>
+ </table>
+ <a class="button" href="/killstatistics?world={{.Name}}">Kill Statistics</a>
+ {{else}}
+ <p>No information available.</p>
+ {{end}}
+ </div>
+
+ <div class="box">
+ <h1>Players Online</h1>
+ {{if .OnlineCharacters}}
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Level</th>
+ <th>Vocation</th>
+ <th>World</th>
+ <th>Status</th>
+ </tr>
+ {{range .OnlineCharacters}}
+ <tr>
+ <td><a href="/character?name={{.Name}}">{{.Name}}</a></td>
+ <td>{{or .Level 1}}</td>
+ <td>{{or .Profession "None"}}</td>
+ <td>{{.World}}</td>
+ {{if .Online}}
+ <td style="color: #1A1;">Online</td>
+ {{else}}
+ <td style="color: #A11;">Offline</td>
+ {{end}}
+ </tr>
+ {{end}}
+ </table>
+ {{else}}
+ <p>There are no players online.</p>
+ {{end}}
+ </div>
+{{template "_footer.tmpl" .Common}} \ No newline at end of file