feat: Optimisation des images
This commit is contained in:
BIN
src/assets/arbre.png
Normal file
BIN
src/assets/arbre.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 626 KiB |
@ -14,7 +14,7 @@ defineEmits(["answerSelected"]);
|
||||
const slides = ref();
|
||||
|
||||
if (props.question.weight == null) {
|
||||
props.question.weight = props.question.answers[0].weight
|
||||
props.question.weight = props.question.answers[0].weight;
|
||||
}
|
||||
const answerWeight = ref(props.question.weight);
|
||||
|
||||
@ -63,10 +63,7 @@ function slideMove(splide, newIndex) {
|
||||
:key="answer.id"
|
||||
@click="$emit('answerSelected', question, answerWeight)"
|
||||
>
|
||||
<img
|
||||
height="200"
|
||||
:src="`/answers/${answer.image}.png`"
|
||||
/>
|
||||
<img height="200" :src="`/answers/${answer.image}.webp`" />
|
||||
</SplideSlide>
|
||||
</Splide>
|
||||
</template>
|
||||
|
@ -47,11 +47,12 @@ function formatScore(score) {
|
||||
const translation = question.translations.filter(
|
||||
(item) => item.languages_code == language
|
||||
);
|
||||
const answers = formatAnswers(question.answers);
|
||||
return {
|
||||
id: question.id,
|
||||
weight: null,
|
||||
weight: answers[0].weight,
|
||||
title: translation.length > 0 ? translation[0].title : "",
|
||||
answers: formatAnswers(question.answers),
|
||||
answers: answers,
|
||||
splide: ref(),
|
||||
};
|
||||
})
|
||||
|
@ -83,7 +83,7 @@ ul
|
||||
bottom: 0
|
||||
right: 0
|
||||
|
||||
background-image: url(/arbre.png)
|
||||
background-image: url(/arbre.webp)
|
||||
background-position: center
|
||||
background-repeat: no-repeat
|
||||
background-size: contain
|
||||
|
Reference in New Issue
Block a user