2021-10-01 22:49:47 +02:00
|
|
|
{{define "title"}}
|
|
|
|
<title>Serverlist :: {{.Region}}</title>
|
|
|
|
{{end}}
|
2021-09-20 17:43:54 +02:00
|
|
|
|
2021-10-01 22:49:47 +02:00
|
|
|
{{define "content"}}
|
|
|
|
{{ $gamemodes := .Gamemodes}}
|
|
|
|
{{ $servers := .Servers}}
|
|
|
|
{{ $flags := .Flags}}
|
|
|
|
<div class="container mx-auto px-4 sm:px-8">
|
|
|
|
<div class="py-8">
|
|
|
|
<div>
|
|
|
|
<h2 class="text-2xl font-semibold leading-tight">{{.Region}}</h2>
|
|
|
|
</div>
|
2021-10-01 23:01:27 +02:00
|
|
|
{{range $gamemode := $gamemodes -}}
|
2021-10-01 22:49:47 +02:00
|
|
|
<div class="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto">
|
|
|
|
<div class="inline-block min-w-full shadow rounded-lg overflow-hidden">
|
|
|
|
<table class="min-w-full leading-normal">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
2021-09-20 17:31:41 +02:00
|
|
|
|
2021-10-01 22:49:47 +02:00
|
|
|
</th>
|
|
|
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
|
|
|
{{$gamemode.Name}}
|
|
|
|
</th>
|
|
|
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
|
|
|
Map
|
|
|
|
</th>
|
|
|
|
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
|
|
|
|
Players
|
|
|
|
</th>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2021-10-01 23:01:27 +02:00
|
|
|
{{range $server := $servers -}}
|
|
|
|
{{if eq $gamemode.ID $server.GamemodeID -}}
|
2021-10-01 22:49:47 +02:00
|
|
|
<tr id="content">
|
|
|
|
<td class="px-5 border-b border-gray-200 bg-white" id="flag">
|
2021-10-01 23:01:27 +02:00
|
|
|
{{range $flag := $flags -}}
|
|
|
|
{{if eq $server.ServerIP $flag.ServerIP -}}
|
2021-10-01 22:49:47 +02:00
|
|
|
<img src="https://flagcdn.com/16x12/{{$flag.Flag}}.png" srcset="https://flagcdn.com/32x24/{{$flag.Flag}}.png 2x, https://flagcdn.com/48x36/{{$flag.Flag}}.png 3x" width="16" height="12">
|
2021-10-01 23:01:27 +02:00
|
|
|
{{- end}}
|
|
|
|
{{- end}}
|
2021-10-01 22:49:47 +02:00
|
|
|
</td>
|
|
|
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm" id="name">
|
|
|
|
<div class="flex items-center">
|
|
|
|
<div class="ml-3">
|
|
|
|
<a href="steam://connect/{{$server.ServerIP}}" class="text-gray-900 whitespace-no-wrap">{{$server.Name}}</a>
|
2021-09-20 17:31:41 +02:00
|
|
|
</div>
|
2021-10-01 22:49:47 +02:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
|
|
|
<p class="text-gray-900 whitespace-no-wrap">{{$server.Map}}</p>
|
|
|
|
</td>
|
|
|
|
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
|
|
|
<p class="text-gray-900 whitespace-no-wrap">{{$server.Players}}/{{$server.MaxPlayers}}</p>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-10-01 23:01:27 +02:00
|
|
|
{{- end}}
|
|
|
|
{{- end}}
|
2021-10-01 22:49:47 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-09-20 17:31:41 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-01 23:01:27 +02:00
|
|
|
{{- end}}
|
2021-09-20 17:31:41 +02:00
|
|
|
</div>
|
2021-10-01 22:49:47 +02:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{end}}
|