vod jam and earl vod.atverkackt.de
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove height cap on leaderboard

+8 -4
+7 -3
src/lib/game/Leaderboard.svelte
··· 6 6 let loading = $state(true); 7 7 let error = $state(''); 8 8 9 + let { scrollable = true }: { scrollable?: boolean } = $props(); 10 + 9 11 $effect(() => { 10 12 fetchLeaderboard() 11 13 .then((data) => { ··· 20 22 </script> 21 23 22 24 <div class="leaderboard"> 23 - <h3 class="lb-title"><span class="lb-title-text">Leaderboard</span></h3> 24 25 25 26 {#if loading} 26 27 <p class="lb-loading">Loading...</p> ··· 29 30 {:else if entries.length === 0} 30 31 <p class="lb-empty">No completions yet. Be the first!</p> 31 32 {:else} 32 - <div class="lb-list"> 33 + <div class="lb-list" class:scrollable> 33 34 {#each entries as entry, i (entry.did)} 34 35 <div class="lb-entry" class:lb-gold={i === 0} class:lb-silver={i === 1} class:lb-bronze={i === 2}> 35 36 <span class="lb-rank">#{i + 1}</span> ··· 81 82 display: flex; 82 83 flex-direction: column; 83 84 gap: 4px; 85 + padding-right: 4px; 86 + } 87 + 88 + .lb-list.scrollable { 84 89 max-height: 280px; 85 90 overflow-y: auto; 86 - padding-right: 4px; 87 91 } 88 92 89 93 .lb-list::-webkit-scrollbar {
+1 -1
src/routes/leaderboard/+page.svelte
··· 10 10 <a href="/" class="back-link">← Back to Game</a> 11 11 <h1 class="page-title"><span class="title-text">Leaderboard</span></h1> 12 12 <div class="leaderboard-wrap"> 13 - <Leaderboard /> 13 + <Leaderboard scrollable={false} /> 14 14 </div> 15 15 </div> 16 16