trying to get sub label showed properly

This commit is contained in:
Davide Scaini
2026-03-30 20:09:01 +02:00
parent c58bc8f7d5
commit 877472e620
11 changed files with 157 additions and 24 deletions
+9 -1
View File
@@ -158,8 +158,16 @@
class="text-xs font-medium px-2 py-0.5 rounded-full"
style="background:{color}22;color:{color}"
>
{sportIcon(activity.sport)} {sportLabel(activity.sport, activity.sub_sport)}
{sportIcon(activity.sport)} {sportLabel(activity.sport)}
</span>
{#if activity.sub_sport && activity.sub_sport !== 'generic'}
<span
class="text-xs font-medium px-2 py-0.5 rounded-full"
style="background:{color}11;color:{color}cc"
>
{sportLabel(activity.sport, activity.sub_sport).split(' ')[0]}
</span>
{/if}
<span class="text-xs text-zinc-500">
{formatDate(activity.started_at)} · {formatTime(activity.started_at)}
</span>