ui: Improve CardTheme colors
This commit is contained in:
parent
a812a6a5c6
commit
f5941dcece
2 changed files with 9 additions and 4 deletions
|
|
@ -38,12 +38,17 @@
|
||||||
<Icon name="heart-fill" />
|
<Icon name="heart-fill" />
|
||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
{#if theme.exercice_coeff_max > 1}
|
{#if theme.exercice_coeff_max > 1 || (exercice && exercice.curcoeff > 1)}
|
||||||
<Badge color="warning">
|
<Badge color="success">
|
||||||
<Icon name="gift-fill" />
|
<Icon name="gift-fill" />
|
||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/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">
|
<Badge color="light">
|
||||||
{$myThemes[theme.id].exercice_solved}/{theme.exercice_count}
|
{$myThemes[theme.id].exercice_solved}/{theme.exercice_count}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
{#each Object.keys($themes) as th, index}
|
{#each Object.keys($themes) as th, index}
|
||||||
<Col class="mb-3">
|
<Col class="mb-3">
|
||||||
<CardTheme
|
<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]}
|
theme={$themes[th]}
|
||||||
on:click={goto(`${$themes[th].urlid}`)}
|
on:click={goto(`${$themes[th].urlid}`)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Reference in a new issue