style: fix skeleton widths

This commit is contained in:
Youwen Wu 2024-02-23 17:27:25 -08:00
parent 44e76144dd
commit e447b133ca

View file

@ -19,12 +19,22 @@
$: placeholder = accx === -999 && accy === -999 $: placeholder = accx === -999 && accy === -999
</script> </script>
<div class="flex flex-col gap-2 text-center justify-center"> <div class="flex flex-col gap-2 text-center transition-all">
<p class="text-xl font-medium" class:placeholder> <p class="text-xl font-medium">
Heading {getDirection(orientation)} ({orientation.toFixed(2)}°) {#if !placeholder}
Heading {getDirection(orientation)} ({orientation.toFixed(2)}°)
{:else}
<span class="placeholder">--------------------------------</span>
{/if}
</p> </p>
<p class="text-lg font-medium" class:placeholder> <p class="text-lg font-medium">
{getAcceleration(accResolved)} ({mpss2knps(accResolved).toFixed(2)} {#if !placeholder}
kn/s) {getAcceleration(accResolved)} ({mpss2knps(accResolved).toFixed(2)}
kn/s)
{:else}
<span class="placeholder"
>-----------------------------------------------------</span
>
{/if}
</p> </p>
</div> </div>