ui: Improve CardTheme colors

This commit is contained in:
nemunaire 2021-09-03 11:36:25 +02:00
parent a812a6a5c6
commit f5941dcece
2 changed files with 9 additions and 4 deletions

View File

@ -38,12 +38,17 @@
<Icon name="heart-fill" />
</Badge>
{/if}
{#if theme.exercice_coeff_max > 1}
<Badge color="warning">
{#if theme.exercice_coeff_max > 1 || (exercice && exercice.curcoeff > 1)}
<Badge color="success">
<Icon name="gift-fill" />
</Badge>
{/if}
{#if $myThemes[theme.id].exercice_solved > 0}
{#if exercice && $my && $my.exercices[exercice.id] && $my.exercices[exercice.id].solved_rank}
<Badge color="light" class="text-success fw-bold">
<Icon name="check" />
</Badge>
{/if}
{#if !exercice && $myThemes[theme.id].exercice_solved > 0}
<Badge color="light">
{$myThemes[theme.id].exercice_solved}/{theme.exercice_count}
</Badge>

View File

@ -51,7 +51,7 @@
{#each Object.keys($themes) as th, index}
<Col class="mb-3">
<CardTheme
class="{$my && $my.team_id && $myThemes[$themes[th].id].exercice_solved > 0?'border-success ':''}{$themes[th].exercice_coeff_max > 1?'border-warning ':''}"
class="{$my && $my.team_id && $myThemes[$themes[th].id].exercice_solved > 0?'border-light ':''}{$themes[th].exercice_coeff_max > 1?'border-success ':''}"
theme={$themes[th]}
on:click={goto(`${$themes[th].urlid}`)}
/>