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

chore: empty leaderboard placeholder

This commit is contained in:
Ferdinand Mütsch 2022-10-06 15:17:37 +02:00
parent 1632cea949
commit 5609c0ada3
4 changed files with 14 additions and 2 deletions

View File

@ -70,6 +70,7 @@ let icons = [
'mdi:language-rust', 'mdi:language-rust',
'mdi:language-swift', 'mdi:language-swift',
'mdi:language-typescript', 'mdi:language-typescript',
'twemoji:frowning-face',
] ]
const output = path.normalize(path.join(__dirname, '../static/assets/js/icons.dist.js')) const output = path.normalize(path.join(__dirname, '../static/assets/js/icons.dist.js'))

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -22,7 +22,10 @@
<div class="flex flex-col flex-grow mt-10"> <div class="flex flex-col flex-grow mt-10">
<h1 class="h1" style="margin-bottom: 0.5rem">Leaderboard</h1> <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">Wakapi's leaderboard shows a ranking of the most active users on this servers, given they opted in to get listed on the public leaderboard (see <i>Settings 🠒 Data</i>). Statistics are updated at least every 12 hours and are based on the users' total coding time in the past seven days. </p> <p class="block text-sm text-gray-300 w-full lg:w-3/4 mb-8">
Wakapi's leaderboard shows a ranking of the most active users on this servers, given they opted in to get listed on the public leaderboard. Statistics are updated at least every 12 hours and are based on the users' total coding time in the past seven days.
To participate, log in, go to <a class="link" href="settings#permissions">Settings 🠒 Permissions</a> and enable leaderboards.
</p>
<ul class="flex space-x-4 mb-4 text-gray-600"> <ul class="flex space-x-4 mb-4 text-gray-600">
<li class="font-semibold text-xl {{ if eq .By "" }} text-gray-300 {{ else }} hover:text-gray-500 {{ end }}"> <li class="font-semibold text-xl {{ if eq .By "" }} text-gray-300 {{ else }} hover:text-gray-500 {{ end }}">
@ -49,6 +52,7 @@
{{ end }} {{ 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-8 text-gray-300 w-full lg:w-3/4">
{{ if len .Items }}
<ol> <ol>
{{ range $i, $item := .Items }} {{ range $i, $item := .Items }}
<li class="px-4 py-2 my-2 rounded-md border-2 leaderboard-{{ ($.ColorModifier $item $.User) }} flex justify-between"> <li class="px-4 py-2 my-2 rounded-md border-2 leaderboard-{{ ($.ColorModifier $item $.User) }} flex justify-between">
@ -73,6 +77,13 @@
</li> </li>
{{ end }} {{ end }}
</ol> </ol>
{{ else }}
<p>
<span class="iconify inline text-white text-base" data-icon="twemoji:frowning-face"></span>&nbsp;
The leaderboard is currently empty ...
</p>
{{ end }}
</div> </div>
</div> </div>
</main> </main>