ui: handle exercice image on CardTheme

This commit is contained in:
nemunaire 2024-03-16 10:05:28 +01:00
parent 5edaf2cf3d
commit a9635ca8ac
1 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,13 @@
color="dark"
on:click
>
{#if theme.image}
{#if exercice && exercice.image}
<div
class="card-img-top"
style="background-image: url({ exercice.image.substr(0, exercice.image.length-3) }thumb.jpg)"
style:filter={theme.locked || exercice.disabled ? "grayscale(60%)":null}
></div>
{:else if theme.image}
<div
class="card-img-top"
style="background-image: url({ theme.image.substr(0, theme.image.length-3) }thumb.jpg)"