feat: speedometer
This commit is contained in:
@ -174,6 +174,13 @@
|
||||
<Input class="h-10" placeholder="Search..." bind:value={searchbar.text} />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if !hideSearch && !!location.speed != false}
|
||||
<div id="speedometer" style="position: fixed; {mobileView ? `bottom: calc(50px + ${sidebarHeight.current}px + 10px); right: 10px;` : "bottom: 10px; right: 10px;"}">
|
||||
{(location.speed * 3.6 | 0).toFixed(0)}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
id="sidebar"
|
||||
class={mobileView ? "mobileView" : ""}
|
||||
@ -398,4 +405,17 @@
|
||||
border-bottom-right-radius: 0;
|
||||
padding-bottom: calc(40px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
#speedometer {
|
||||
z-index: 30;
|
||||
background-color: hsla(0, 0%, 5%, 0.6);
|
||||
backdrop-filter: blur(5px);
|
||||
aspect-ratio: 1 / 1;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
width: calc(2ch + 20px);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user