Files
nav-carte/components/codev/RecetteBarre.vue
T

50 lines
3.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<figure class="barre">
<svg viewBox="0 0 600 244" role="img" aria-labelledby="barre-titre barre-desc">
<title id="barre-titre">Deux heures, découpées</title>
<desc id="barre-desc">
Coucou, 10 minutes. Temps collectif, 20 à 30 minutes. Entraide, 1 heure 20 : un quart d'heure par personne,
cinq minutes pour poser le sujet, cinq pour les questions, cinq pour les conseils. Clôture, 5 minutes.
</desc>
<!-- noms au-dessus : les deux longs segments -->
<text x="52" y="26" class="b-nom">Temps collectif</text>
<text x="375" y="26" class="b-nom" text-anchor="middle">Entraide</text>
<!-- la barre : 10 + 25 + 80 + 5 = 120 minutes, 5 unités par minute -->
<rect x="0" y="40" width="48" height="52" rx="6" class="b-seg b-seg--clair" />
<rect x="51" y="40" width="122" height="52" rx="6" class="b-seg b-seg--moyen" />
<rect x="176" y="40" width="397" height="52" rx="6" class="b-seg b-seg--fort" />
<rect x="576" y="40" width="24" height="52" rx="6" class="b-seg b-seg--clair" />
<text x="24" y="74" class="b-duree" text-anchor="middle">10′</text>
<text x="112" y="74" class="b-duree" text-anchor="middle">20-30′</text>
<text x="375" y="74" class="b-duree b-duree--inverse" text-anchor="middle">1 h 20</text>
<!-- noms en dessous : les deux courts -->
<text x="0" y="122" class="b-nom">Coucou · 10′</text>
<text x="600" y="122" class="b-nom" text-anchor="end">Clôture · 5′</text>
<!-- zoom : un quart d'heure par personne -->
<path d="M176 96 L176 146 M573 96 L573 146" class="b-zoom" />
<g v-for="(s, i) in ['sujet', 'questions', 'conseils']" :key="s" :transform="`translate(${176 + i * 133.5} 146)`">
<rect width="130" height="60" rx="5" class="b-sous" />
<text x="65" y="26" class="b-sous-txt" text-anchor="middle">{{ s }}</text>
<text x="65" y="49" class="b-sous-txt b-sous-txt--duree" text-anchor="middle">5′</text>
</g>
<text x="374.5" y="236" class="b-legende" text-anchor="middle">un quart d'heure par personne</text>
</svg>
</figure>
</template>
<style scoped>
.barre { margin: var(--space-lg) 0; }
.barre svg { display: block; width: 100%; height: auto; overflow: visible; }
.b-nom { font-size: 23px; font-weight: 700; fill: var(--text); }
.b-seg--clair { fill: var(--bg-alt); stroke: var(--border-strong); }
.b-seg--moyen { fill: color-mix(in srgb, var(--nav-primary-solid) 28%, var(--surface)); }
.b-seg--fort { fill: var(--nav-primary-solid); }
.b-duree { font-size: 23px; font-weight: 700; fill: var(--text); }
.b-duree--inverse { fill: var(--nav-text-on-primary); }
.b-zoom { stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.b-sous { fill: var(--surface); stroke: var(--nav-primary-solid); stroke-width: 1.5; }
.b-sous-txt { font-size: 21px; font-weight: 600; fill: var(--text); }
.b-sous-txt--duree { font-weight: 400; }
.b-legende { font-size: 20px; fill: color-mix(in srgb, var(--text) 78%, transparent); }
</style>