mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
* Inertia p1? * Inertia'fied signed out homepage? * Split up signed in page * WIP signed in v2? * Better signed in? * Clean up extensions page! * Fix currently hacking * Better docs page? * Docs update 2 * Clean up "What is Hackatime?" + get rid of that godawful green dev mode * Better nav? * Cleaner settings? * Fix commit times * Fix flashes + OS improv * Setup v2 * Readd some of the syncers? * Remove stray emdash * Clean up Step 3 * Oops, remove .vite * bye bye, /inertia-example * bin/rubocop -A * Fix docs vuln
40 lines
890 B
Svelte
40 lines
890 B
Svelte
<script lang="ts">
|
|
let {
|
|
label,
|
|
value,
|
|
highlight = false,
|
|
subtitle = "",
|
|
}: {
|
|
label: string;
|
|
value: string | number;
|
|
highlight?: boolean;
|
|
subtitle?: string;
|
|
} = $props();
|
|
</script>
|
|
|
|
<div
|
|
class={`
|
|
relative flex flex-col justify-between p-4 pb-6 rounded-xl border transition-all duration-200 h-full
|
|
${
|
|
highlight
|
|
? "bg-primary/10 border-primary/30"
|
|
: "bg-white/5 border-white/10 hover:border-white/20"
|
|
}
|
|
`}
|
|
>
|
|
<div
|
|
class="text-secondary/80 text-xs font-medium uppercase tracking-wider mb-2"
|
|
>
|
|
{label}
|
|
</div>
|
|
<div
|
|
class={`font-bold text-white wrap-break-word ${String(value).length > 15 ? "text-lg" : "text-xl"}`}
|
|
>
|
|
{value || "—"}
|
|
</div>
|
|
{#if subtitle}
|
|
<span class="absolute bottom-2 left-4 text-xs text-secondary font-normal opacity-70"
|
|
>{subtitle}</span
|
|
>
|
|
{/if}
|
|
</div>
|