54 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{define "stats"}}
 | |
| <!DOCTYPE html>
 | |
| <html lang="en">
 | |
| <head>
 | |
| 	<title>Alias</title>
 | |
| 	<script src="/assets/tailwind.css"></script>
 | |
| 	<link rel="stylesheet" href="/assets/style.css"/>
 | |
| 	<script src="/assets/htmx.min.js"></script>
 | |
| 	<script src="/assets/htmx.sse.js"></script>
 | |
| 	<script src="/assets/helpers.js"></script>
 | |
| 	<meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1"/>
 | |
| 	<link rel="icon" sizes="64x64" href="/assets/favicon/wolfhead_negated.ico"/>
 | |
| </head>
 | |
| <body>
 | |
| <div id="ancestor">
 | |
| <div class="container mx-auto p-4">
 | |
|     <h1 class="text-2xl font-bold mb-4">Player Leaderboard</h1>
 | |
|     <div class="mb-4">
 | |
|         <a href="/" class="bg-indigo-600 text-white font-semibold text-sm px-4 py-2 rounded hover:bg-indigo-500 visited:text-white">
 | |
|             back home
 | |
|         </a>
 | |
|     </div>
 | |
|     <div class="overflow-x-auto">
 | |
|         <table class="min-w-full bg-white">
 | |
|             <thead class="bg-gray-800 text-white">
 | |
|                 <tr>
 | |
|                     <th class="py-2 px-4">Player</th>
 | |
|                     <th class="py-2 px-4">Games Played</th>
 | |
|                     <th class="py-2 px-4">Games Won</th>
 | |
|                     <th class="py-2 px-4">Games Lost</th>
 | |
|                     <th class="py-2 px-4">Mime Winrate</th>
 | |
|                     <th class="py-2 px-4">Guesser Winrate</th>
 | |
|                 </tr>
 | |
|             </thead>
 | |
|             <tbody class="text-gray-700">
 | |
|                 {{range .}}
 | |
|                 <tr>
 | |
|                     <td class="py-2 px-4 border">{{.Username}}</td>
 | |
|                     <td class="py-2 px-4 border">{{.GamesPlayed}}</td>
 | |
|                     <td class="py-2 px-4 border">{{.GamesWon}}</td>
 | |
|                     <td class="py-2 px-4 border">{{.GamesLost}}</td>
 | |
|                     <td class="py-2 px-4 border">{{printf "%.2f" .MimeWinrate}}</td>
 | |
|                     <td class="py-2 px-4 border">{{printf "%.2f" .GuesserWinrate}}</td>
 | |
|                 </tr>
 | |
|                 {{end}}
 | |
|             </tbody>
 | |
|         </table>
 | |
|     </div>
 | |
| </div>
 | |
| </div>
 | |
| </body>
 | |
| </html>
 | |
| {{end}}
 | 
