mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: leaderboard responsiveness
This commit is contained in:
parent
ef87445e43
commit
2ce720c20f
@ -141,3 +141,9 @@ body {
|
||||
filter: invert(1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.max-available {
|
||||
max-width: -moz-available;
|
||||
max-width: -webkit-fill-available;
|
||||
max-width: fill-available;
|
||||
}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -19,7 +19,7 @@
|
||||
{{ end }}
|
||||
|
||||
<main class="mt-10 flex-grow flex justify-center w-full" id="leaderboard-page">
|
||||
<div class="flex flex-col flex-grow mt-10">
|
||||
<div class="flex flex-col flex-grow mt-10 max-available">
|
||||
<h1 class="h1" style="margin-bottom: 0.5rem">Leaderboard</h1>
|
||||
|
||||
<p class="block text-sm text-gray-300 w-full lg:w-3/4 mb-8">
|
||||
@ -37,10 +37,10 @@
|
||||
</ul>
|
||||
|
||||
{{ if ne .By "" }}
|
||||
<div class="flex space-x-2 mb-4">
|
||||
{{ range $i, $key := (strslice .TopKeys 0 20) }}
|
||||
<div class="inline-block">
|
||||
<a href="leaderboard?by={{ $.By }}&key={{ $key }}" class="{{ if eq $.Key (lower $key) }} btn-primary {{ else }} btn-default {{ end }} btn-small cursor-pointer">
|
||||
<div class="flex flex-wrap space-x-2 mb-4">
|
||||
{{ range $i, $key := (strslice .TopKeys 0 10) }}
|
||||
<div class="inline-block mb-4">
|
||||
<a href="leaderboard?by={{ $.By }}&key={{ $key }}" class="{{ if eq $.Key (lower $key) }} btn-primary {{ else }} btn-default {{ end }} btn-small cursor-pointer whitespace-nowrap">
|
||||
{{ if and (eq (lower $.By) "language") ($.LangIcon $key) }}
|
||||
<span class="align-middle leading-none"><span class="iconify inline text-white text-base" data-icon="{{ ($.LangIcon $key) | urlSafe }}"></span> </span>
|
||||
{{ end }}
|
||||
@ -51,7 +51,7 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="flex flex-col space-y-4 mt-8 text-gray-300 w-full lg:w-3/4">
|
||||
<div class="flex flex-col space-y-4 mt-4 text-gray-300 w-full lg:w-3/4">
|
||||
{{ if len .Items }}
|
||||
<ol>
|
||||
{{ range $i, $item := .Items }}
|
||||
@ -65,14 +65,14 @@
|
||||
{{ end }}
|
||||
<strong class="text-ellipsis truncate">@{{ $item.UserID }}</strong>
|
||||
</div>
|
||||
<span class="w-5/12 mx-1 truncate leading-6 align-middle">
|
||||
<div class="w-5/12 mx-1 truncate leading-6 align-middle">
|
||||
{{ range $i, $lang := (index $.UserLanguages $item.UserID) }}
|
||||
{{ if $.LangIcon $lang }}
|
||||
<span class="align-middle leading-none"><span class="iconify inline text-white text-base" data-icon="{{ ($.LangIcon $lang) | urlSafe }}"></span></span>
|
||||
{{ end }}
|
||||
<span class="text-sm leading-6">{{ $lang }}{{ if lt $i (add (len (index $.UserLanguages $item.UserID)) -1) }}, {{ end }}</span>
|
||||
{{ end }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="w-3/12 ml-1 text-right"><span>{{ $item.Total | duration }}</span></div>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user