feat: Modification de l'échelle de résultat
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Simon 2024-02-21 14:29:41 +01:00
parent d2f5d7d840
commit 60cf5bb77e
1 changed files with 18 additions and 6 deletions

View File

@ -88,8 +88,10 @@ function getResultsFromScore(score) {
effets: translation.length > 0 ? translation[0].effets : "", effets: translation.length > 0 ? translation[0].effets : "",
facteur: translation.length > 0 ? translation[0].facteur : "", facteur: translation.length > 0 ? translation[0].facteur : "",
pde: translation.length > 0 ? translation[0].pde : "", pde: translation.length > 0 ? translation[0].pde : "",
title: translation.length > 0 ? translation[0].title : "",
}; };
}); })
.reverse();
} }
const results = ref(getResultsFromScore(score)); const results = ref(getResultsFromScore(score));
const result = computed(() => const result = computed(() =>
@ -185,14 +187,14 @@ async function share() {
<div> <div>
<h2 class="center">{{ trad.result_title }}</h2> <h2 class="center">{{ trad.result_title }}</h2>
<h2 class="center">{{ result.pde_qtra }}</h2> <h2 class="center">{{ result.pde_qtra }}</h2>
<div class="gradient"> <div :class="'gradient size-'+results.length">
<div <div
v-for="(item, index) in [...Array(7).keys()]" v-for="(item, index) in results"
:class="{ active: result && result.pde_qtra === index + 1 }" :class="{ active: result && result.pde_qtra === item.pde_qtra }"
:key="item" :key="item"
:data-title=trad.result_sigle :data-title=trad.result_sigle
> >
{{ index + 1 }} {{ item.title }}
</div> </div>
</div> </div>
<div class="details"> <div class="details">
@ -381,8 +383,18 @@ label
text-shadow: 1px 1px 4px var(--color-highlight-text-invert),-1px -1px 4px var(--color-highlight-text-invert), -1px 1px 4px var(--color-highlight-text-invert), 1px -1px 4px var(--color-highlight-text-invert) text-shadow: 1px 1px 4px var(--color-highlight-text-invert),-1px -1px 4px var(--color-highlight-text-invert), -1px 1px 4px var(--color-highlight-text-invert), 1px -1px 4px var(--color-highlight-text-invert)
color: var(--color-highlight-text) color: var(--color-highlight-text)
div &.size-3 div
width: calc(100%/3)
&.size-4 div
width: calc(100%/4)
&.size-5 div
width: calc(100%/5)
&.size-6 div
width: calc(100%/6)
&.size-7 div
width: calc(100%/7) width: calc(100%/7)
div
text-align: center text-align: center
align-self: center align-self: center
font-weight: bold font-weight: bold