basic flag support
This commit is contained in:
parent
8c56389991
commit
19e94f036e
11 changed files with 134 additions and 151 deletions
|
@ -3,6 +3,17 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://unpkg.com/tailwindcss@1.0.4/dist/tailwind.min.css" rel="stylesheet">
|
||||
<style>
|
||||
tr#content {
|
||||
line-height: 0;
|
||||
}
|
||||
td#flag {
|
||||
padding-right: 0;
|
||||
}
|
||||
td#name {
|
||||
padding-left: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="flex items-center justify-center" style="background: #edf2f7;">
|
||||
<section class="container mx-auto px-8 my-1 flex flex-wrap -m-4">
|
||||
|
@ -44,10 +55,11 @@
|
|||
|
||||
{{ $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">All Regions - Serverlist</h2>
|
||||
<h2 class="text-2xl font-semibold leading-tight">{{.Region}}</h2>
|
||||
</div>
|
||||
{{range $gamemode := $gamemodes}}
|
||||
<div class="-mx-4 sm:-mx-8 px-4 sm:px-8 py-4 overflow-x-auto">
|
||||
|
@ -55,6 +67,9 @@
|
|||
<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">
|
||||
|
||||
</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>
|
||||
|
@ -70,8 +85,15 @@
|
|||
<tbody>
|
||||
{{range $server := $servers}}
|
||||
{{if eq $gamemode.ID $server.GamemodeID}}
|
||||
<tr>
|
||||
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
|
||||
<tr id="content">
|
||||
<td class="px-5 border-b border-gray-200 bg-white" id="flag">
|
||||
{{range $flag := $flags}}
|
||||
{{if eq $server.ServerIP $flag.ServerIP}}
|
||||
<img src="https://flagcdn.com/16x12/{{$flag.Flag}}.png">
|
||||
{{end}}
|
||||
{{end}}
|
||||
</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>
|
||||
|
|
Reference in a new issue