- NavEchelles : trois groupes (accroche pastille + titre, <ul> étiqueté, aria-current) ≥ 1280 ; groupe courant seul 768-1279 ; lu depuis utils/echelles.ts - NavTiroir remplace le menu déroulant : tiroir à droite, voile, Échap, focus piégé et rendu, cibles 44 px ; bouton « Menu » masqué ≥ 1280 - FilEchelle < 768, dans le flux avant le conteneur de page - Soutenir et À propos dans la barre ≥ 1280 ; Signaler quitte la barre - barre de recherche d'en-tête retirée (/ garde sa recherche dans MobileSheet à 768 et 1000, vérifié au DOM) - html lang="fr" (Lighthouse html-has-lang) B10 M2-M4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBu7CSLy7PJgL4HJaV5oHP
85 lines
2.4 KiB
Vue
85 lines
2.4 KiB
Vue
<!--
|
|
FilEchelle — B10-M4
|
|
< 768 px : une ligne de 28 px sous la barre, « S · Partir de soi · Outils · Jobs » :
|
|
l'échelle courante, l'onglet courant, puis ses voisins du groupe (liens).
|
|
Absente sur les pages hors groupe (Manifeste, À propos, Proposer, Signaler, fiche).
|
|
Montée dans le flux de la colonne d'app.vue, AVANT le conteneur de page : la carte
|
|
de / perd ces 28 px à vue, jamais en dessous de la ligne de flottaison.
|
|
-->
|
|
<template>
|
|
<nav v-if="courant" class="fil-echelle" aria-label="Échelle courante">
|
|
<span class="fil-echelle__pastille">{{ courant.echelle }}</span>
|
|
<span class="fil-echelle__titre">{{ ECHELLES[courant.echelle].titre }}</span>
|
|
<span class="fil-echelle__sep" aria-hidden="true">·</span>
|
|
<span class="fil-echelle__courant" aria-current="page">{{ courant.onglet.libelle }}</span>
|
|
<template v-for="o in voisins" :key="o.to">
|
|
<span class="fil-echelle__sep" aria-hidden="true">·</span>
|
|
<NuxtLink :to="o.to" class="fil-echelle__lien">{{ o.libelle }}</NuxtLink>
|
|
</template>
|
|
</nav>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ECHELLES, echelleDeRoute } from '~/utils/echelles'
|
|
|
|
const route = useRoute()
|
|
const courant = computed(() => echelleDeRoute(route))
|
|
const voisins = computed(() =>
|
|
courant.value ? ECHELLES[courant.value.echelle].onglets.filter((o) => o !== courant.value!.onglet) : [],
|
|
)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.fil-echelle {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
height: 28px;
|
|
padding: 0 var(--space-sm);
|
|
gap: 5px;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
white-space: nowrap;
|
|
font-size: 0.72rem;
|
|
line-height: 1;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--bg-alt);
|
|
color: color-mix(in srgb, var(--text) 78%, transparent);
|
|
}
|
|
|
|
.fil-echelle::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.fil-echelle__pastille {
|
|
padding: 2px 5px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--accent);
|
|
color: var(--on-accent);
|
|
font-weight: var(--fw-bold);
|
|
}
|
|
|
|
.fil-echelle__courant {
|
|
font-weight: var(--fw-bold);
|
|
color: var(--text);
|
|
}
|
|
|
|
.fil-echelle__lien {
|
|
color: inherit;
|
|
text-decoration: underline;
|
|
text-decoration-color: var(--border);
|
|
text-underline-offset: 3px;
|
|
}
|
|
|
|
.fil-echelle__lien:focus-visible {
|
|
outline: 2px solid var(--focus-ring);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.fil-echelle {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|