1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/views/leaderboard.tpl.html

50 lines
1.5 KiB
HTML
Raw Normal View History

2022-10-03 11:53:27 +03:00
<!DOCTYPE html>
<html lang="en">
{{ template "head.tpl.html" . }}
<script>
const defaultTab = 'total'
</script>
<body class="relative bg-gray-900 text-gray-700 p-4 pt-10 flex flex-col min-h-screen {{ if .User }} max-w-screen-xl {{ else }} max-w-screen-lg {{end}} mx-auto justify-center">
{{ template "alerts.tpl.html" . }}
{{ if .User }}
{{ template "menu-main.tpl.html" . }}
{{ else }}
{{ template "header.tpl.html" . }}
{{ template "login-btn.tpl.html" . }}
{{ end }}
<main class="mt-10 flex-grow flex justify-center w-full" id="leaderboard-page">
2022-10-03 11:53:27 +03:00
<div class="flex flex-col flex-grow mt-10">
<h1 class="font-semibold text-3xl text-white m-0 mb-4">Leaderboard</h1>
<ul class="flex space-x-4 mb-16 text-gray-600">
<li class="font-semibold text-2xl {{ if eq .By "" }} text-gray-300 {{ else }} hover:text-gray-500 {{ end }}">
<a href="leaderboard">Total</a>
2022-10-03 11:53:27 +03:00
</li>
<li class="font-semibold text-2xl {{ if eq .By "language" }} text-gray-300 {{ else }} hover:text-gray-500 {{ end }}">
<a href="leaderboard?by=language">By Language</a>
2022-10-03 11:53:27 +03:00
</li>
</ul>
<div id="total" class="tab flex flex-col space-y-4">
2022-10-03 11:53:27 +03:00
<ol>
{{ range $i, $item := .Items }}
<li>{{ $item.Rank }} - {{ $item.UserID }} - {{ $item.Total | duration }}</li>
{{ end }}
</ol>
</div>
</div>
</main>
{{ template "footer.tpl.html" . }}
{{ template "foot.tpl.html" . }}
</body>
</html>