diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2022-12-15 20:19:42 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 20:19:42 -0600 |
commit | ed5eedab8f9fc90dadf5c442cf559572d1b35f0c (patch) | |
tree | 01a763fd11810e9970f14f7dae180e95b279de9a /src/lib/sections/StatList.svelte | |
parent | 89bf3d31e36ad3bdfd45461ee6fb69a4c791f848 (diff) | |
parent | 103689520f51991a1e9a4ca5829fe2f46d1a32c2 (diff) | |
download | skyblock-stats-ed5eedab8f9fc90dadf5c442cf559572d1b35f0c.tar.gz skyblock-stats-ed5eedab8f9fc90dadf5c442cf559572d1b35f0c.tar.bz2 skyblock-stats-ed5eedab8f9fc90dadf5c442cf559572d1b35f0c.zip |
Merge pull request #6 from skyblockstats/sveltekit-v1
Sveltekit v1
Diffstat (limited to 'src/lib/sections/StatList.svelte')
-rw-r--r-- | src/lib/sections/StatList.svelte | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/lib/sections/StatList.svelte b/src/lib/sections/StatList.svelte deleted file mode 100644 index 38604d7..0000000 --- a/src/lib/sections/StatList.svelte +++ /dev/null @@ -1,48 +0,0 @@ -<!-- - @component - - A sorted list of a user's stats, with the total sometimes being at the top. ---> -<script lang="ts"> - import { cleanId, millisecondsToTime } from '$lib/utils' - import type { StatItem } from '$lib/APITypes' - - export let stats: StatItem[] -</script> - -<ul> - {#each stats.sort((a, b) => b.value - a.value) as stat} - <li class:total-stat={stat.categorizedName === 'total'}> - <span class="stat-name">{cleanId(stat.categorizedName)}:</span> - <span class="stat-value"> - {#if stat.unit === 'time'} - {millisecondsToTime(stat.value)} - {:else} - {stat.value.toLocaleString()} - {/if} - </span> - </li> - {/each} -</ul> - -<style> - .total-stat .stat-name { - color: var(--theme-darker-text); - } - .total-stat .stat-value { - font-weight: bold; - } - - .total-stat { - list-style-type: none; - padding: 0 0 0.5em 0; - right: 1em; - } - li { - position: relative; - } - ul { - margin-top: 0.5em; - padding-left: 1em; - } -</style> |