[+] Emphasize registered users

This commit is contained in:
Azalea
2024-03-14 22:23:48 -04:00
parent 9565d48b04
commit 7bbd90ab91
3 changed files with 21 additions and 8 deletions

View File

@@ -20,12 +20,12 @@
</script>
<main class="content leaderboard">
<h2>Global Leaderboard</h2>
<h2 class="outer-title">Global Leaderboard</h2>
{#if d}
<div class="leaderboard-container">
<div class="lb-user">
<span class="rank"></span>
<span class="rank">Rank</span>
<span class="name"></span>
<span class="rating">Rating</span>
<span class="accuracy">Accuracy</span>
@@ -35,11 +35,13 @@
{#each d.users as user, i (user.rank)}
<div class="lb-user" class:alternate={i % 2 === 1}>
<span class="rank">#{user.rank}</span>
{#if user.username !== ""}
<a class="name" href="/u/{user.username}">{user.name}</a>
{:else}
<span class="name">{user.name}</span>
{/if}
<span class="name">
{#if user.username !== ""}
<a href="/u/{user.username}" class:registered={!(/user\d+/.test(user.username))}>{user.name}</a>
{:else}
<span>{user.name}</span>
{/if}
</span>
<span class="rating">{user.rating.toLocaleString()}</span>
<span class="accuracy">{(+user.accuracy).toFixed(2)}%</span>
<span class="fc">{user.fullCombo}</span>
@@ -76,6 +78,15 @@
min-width: 100px
flex: 1
> a
color: unset
.registered
background: $grad-special
color: transparent
-webkit-background-clip: text
background-clip: text
.accuracy, .rating
width: 15%
min-width: 45px

View File

@@ -441,7 +441,7 @@ $gap: 20px
.rank-S
// Gold green gradient on text
background: linear-gradient(90deg, #ffee94, #ffb798, #ffa3e5, #ebff94)
background: $grad-special
-webkit-background-clip: text
color: transparent

View File

@@ -15,6 +15,8 @@ $nav-height: 4rem
$w-mobile: 560px
$w-max: 900px
$grad-special: linear-gradient(90deg, #ffee94, #ffb798, #ffa3e5, #ebff94)
$border-radius: 12px
$transition: all 0.25s