feat(aep-v1.1): PA3 bouton Proposer contextuel + CTA sidebar ecosysteme

- app.vue : bouton + Proposer du header pointe vers /proposer-pratique
  si on est sur la carte pratiques regenerative (et sous-pages /pratique/),
  sinon vers /contribuer (ecosysteme AEP par defaut). Idem icone mobile.
- NavSidebar.vue : ajoute le CTA + Proposer une fiche en pied de sidebar
  (style aligne sur PratiqueSidebar.vue)
This commit is contained in:
Jules Neny
2026-04-30 02:26:24 +02:00
parent 358cb55d50
commit a6fff9a950
2 changed files with 46 additions and 4 deletions

18
app.vue
View File

@@ -107,9 +107,9 @@
> >
Signaler Signaler
</NuxtLink> </NuxtLink>
<!-- Proposer une ressource --> <!-- Proposer une ressource (cible contextuelle selon la carte active) -->
<NuxtLink <NuxtLink
to="/contribuer" :to="proposeTarget"
class="px-3 py-1.5 rounded-lg text-sm font-semibold transition-all hover:opacity-80 hidden sm:inline-flex items-center gap-1" class="px-3 py-1.5 rounded-lg text-sm font-semibold transition-all hover:opacity-80 hidden sm:inline-flex items-center gap-1"
style="background: var(--nav-accent); color: var(--nav-text);" style="background: var(--nav-accent); color: var(--nav-text);"
> >
@@ -136,9 +136,9 @@
</svg> </svg>
</button> </button>
<!-- Mobile : contribuer icône --> <!-- Mobile : contribuer icône (cible contextuelle) -->
<NuxtLink <NuxtLink
to="/contribuer" :to="proposeTarget"
class="sm:hidden p-2 rounded-lg" class="sm:hidden p-2 rounded-lg"
style="background: var(--nav-accent); color: var(--nav-text);" style="background: var(--nav-accent); color: var(--nav-text);"
title="Contribuer une fiche" title="Contribuer une fiche"
@@ -253,6 +253,16 @@ function clearHeaderSearch() {
function goRandom() { function goRandom() {
router.push({ path: '/', query: { random: '1' } }) router.push({ path: '/', query: { random: '1' } })
} }
// ── Cible contextuelle du bouton Proposer ────────────────────────────────
// Sur l'onglet pratiques regeneratives, route vers /proposer-pratique.
// Sur l'onglet ecosysteme AEP (et toute autre route), route vers /contribuer.
const proposeTarget = computed(() => {
if (route.path.startsWith('/pratiques-regeneratives') || route.path.startsWith('/pratique/')) {
return '/proposer-pratique'
}
return '/contribuer'
})
</script> </script>
<style> <style>

View File

@@ -136,6 +136,18 @@
</div> </div>
</div> </div>
<!-- CTA PROPOSER -->
<div
class="shrink-0 px-4 py-3 border-t"
style="border-color: var(--nav-bg-alt);"
>
<NuxtLink
to="/contribuer"
class="sidebar-cta-link"
>
+ Proposer une fiche
</NuxtLink>
</div>
</aside> </aside>
</template> </template>
@@ -254,4 +266,24 @@ function orgFonctions(org: Org): string[] {
color: var(--nav-text); color: var(--nav-text);
background: var(--nav-bg-alt); background: var(--nav-bg-alt);
} }
.sidebar-cta-link {
display: block;
width: 100%;
padding: 0.5rem 0.75rem;
text-align: center;
font-size: 0.82rem;
font-weight: 600;
color: var(--nav-primary-solid);
background: transparent;
border: 1px solid var(--nav-primary-solid);
border-radius: 6px;
text-decoration: none;
transition: background 0.15s, color 0.15s;
}
.sidebar-cta-link:hover {
background: var(--nav-primary);
color: var(--nav-text-on-primary);
}
</style> </style>