feat(evenements): event.trans-former.fr — index, carrefour Ruetz, semaine codev, plantation, inscriptions (Y, commit A)
- Routage par hôte (app/router.options.ts) : sur event., seules les pages de pages/evenements/ existent, servies sans le préfixe ; copie sous aep.…/evenements/ avec la barre AEP, canonique event. et noindex. - app.vue : en-tête, FilEchelle et NavTiroir masqués sur event. ; le conteneur y garde le défilement. - /ruetz (carrefour), /ruetz/codev (frise SVG, compteur de places), /ruetz/foret (plan, syntropie en trois niveaux dépliables, gestes en SVG). - POST /api/evenements/inscription (Zod partagé, honeypot, 3/IP/jour, 409 complet, 503 sans table) et GET /api/evenements/places (cache 60 s) ; NocoDB inscriptions_ruetz, fixture hors dépôt en dev ; ntfy sans donnée personnelle hors prénom. - nuxt.config.ts : une clé, inscriptionsRuetzTableId. - Photos sans visage reconnaissable (n8 floutée dans le fichier), EXIF retirés ; le plan s'ouvre en grand ; boutons « Je m'inscris ↓ » masqués quand c'est complet. - deploy/ruetz/README.md pour le checkpoint ; node scripts/test-y.mjs (42 cas). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CM63J14oj62y6mz4sB43n
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1054172ec9
commit
f0fe8eede3
@@ -0,0 +1,319 @@
|
||||
<template>
|
||||
<div class="fi">
|
||||
<!-- Confirmation -->
|
||||
<div v-if="etat === 'ok'" ref="confirmation" class="fi-message fi-message--ok" tabindex="-1" role="status">
|
||||
<p class="fi-message__titre">Merci, c'est noté.</p>
|
||||
<p>Jules vous écrit avec les détails<template v-if="page === 'codev'"> et le lien de règlement</template>.</p>
|
||||
</div>
|
||||
|
||||
<!-- Complet -->
|
||||
<div v-else-if="complet || etat === 'complet'" class="fi-message" role="status">
|
||||
<p class="fi-message__titre">C'est complet.</p>
|
||||
<p>Écrivez-nous : <a :href="`mailto:${contact}`">{{ contact }}</a></p>
|
||||
</div>
|
||||
|
||||
<!-- Table non configurée -->
|
||||
<div v-else-if="!disponible || etat === 'indisponible'" class="fi-message" role="status">
|
||||
<p>Pour vous inscrire, écrivez à <a :href="`mailto:${contact}`">{{ contact }}</a></p>
|
||||
</div>
|
||||
|
||||
<form v-else novalidate :aria-describedby="`fi-${page}-donnees`" @submit.prevent="envoyer">
|
||||
<div class="fi-duo">
|
||||
<div class="fi-champ">
|
||||
<label :for="id('prenom')">Prénom</label>
|
||||
<input :id="id('prenom')" v-model="f.prenom" v-bind="aria('prenom')" autocomplete="given-name" maxlength="60" required>
|
||||
<p v-if="err.prenom" :id="id('prenom-err')" class="fi-err">{{ err.prenom }}</p>
|
||||
</div>
|
||||
<div class="fi-champ">
|
||||
<label :for="id('nom')">Nom</label>
|
||||
<input :id="id('nom')" v-model="f.nom" v-bind="aria('nom')" autocomplete="family-name" maxlength="80" required>
|
||||
<p v-if="err.nom" :id="id('nom-err')" class="fi-err">{{ err.nom }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fi-champ">
|
||||
<label :for="id('email')">Email</label>
|
||||
<input :id="id('email')" v-model="f.email" v-bind="aria('email')" type="email" autocomplete="email" inputmode="email" maxlength="200" required>
|
||||
<p v-if="err.email" :id="id('email-err')" class="fi-err">{{ err.email }}</p>
|
||||
</div>
|
||||
|
||||
<div class="fi-champ">
|
||||
<label :for="id('telephone')">Téléphone <span class="fi-facultatif">facultatif, pour le covoiturage</span></label>
|
||||
<input :id="id('telephone')" v-model="f.telephone" v-bind="aria('telephone')" type="tel" autocomplete="tel" inputmode="tel" maxlength="30">
|
||||
<p v-if="err.telephone" :id="id('telephone-err')" class="fi-err">{{ err.telephone }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Codev : dates -->
|
||||
<template v-if="page === 'codev'">
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('arrivee')">
|
||||
<legend>J'arrive le</legend>
|
||||
<div class="fi-choix">
|
||||
<label v-for="d in ARRIVEES_CODEV" :key="d" class="fi-option">
|
||||
<input v-model="f.arrivee" type="radio" :name="id('arrivee')" :value="d">
|
||||
<span>{{ jourLong(d) }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p v-if="err.arrivee" :id="id('arrivee-err')" class="fi-err">{{ err.arrivee }}</p>
|
||||
</fieldset>
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('depart')">
|
||||
<legend>Je repars le</legend>
|
||||
<div class="fi-choix">
|
||||
<label v-for="d in DEPARTS_CODEV" :key="d" class="fi-option">
|
||||
<input v-model="f.depart" type="radio" :name="id('depart')" :value="d">
|
||||
<span>{{ jourLong(d) }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p v-if="err.depart" :id="id('depart-err')" class="fi-err">{{ err.depart }}</p>
|
||||
</fieldset>
|
||||
<div class="fi-champ">
|
||||
<label class="fi-option fi-option--case">
|
||||
<input v-model="f.reste_plantation" type="checkbox">
|
||||
<span>Je reste pour la plantation du 28-29 novembre</span>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Forêt : qui, quand, où dormir -->
|
||||
<template v-else>
|
||||
<div class="fi-duo">
|
||||
<div class="fi-champ">
|
||||
<label :for="id('nb_personnes')">Nombre de personnes</label>
|
||||
<select :id="id('nb_personnes')" v-model.number="f.nb_personnes" v-bind="aria('nb_personnes')">
|
||||
<option v-for="n in 8" :key="n" :value="n">{{ n }}</option>
|
||||
</select>
|
||||
<p v-if="err.nb_personnes" :id="id('nb_personnes-err')" class="fi-err">{{ err.nb_personnes }}</p>
|
||||
</div>
|
||||
<div class="fi-champ">
|
||||
<label :for="id('nb_enfants')">dont enfants</label>
|
||||
<select :id="id('nb_enfants')" v-model.number="f.nb_enfants" v-bind="aria('nb_enfants')">
|
||||
<option v-for="n in 8" :key="n - 1" :value="n - 1">{{ n - 1 }}</option>
|
||||
</select>
|
||||
<p v-if="err.nb_enfants" :id="id('nb_enfants-err')" class="fi-err">{{ err.nb_enfants }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('arrivee')">
|
||||
<legend>J'arrive</legend>
|
||||
<div class="fi-choix">
|
||||
<label v-for="a in ARRIVEES_FORET" :key="a" class="fi-option">
|
||||
<input v-model="f.arrivee" type="radio" :name="id('arrivee')" :value="a">
|
||||
<span>{{ ARRIVEES_FORET_LABELS[a] }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p v-if="err.arrivee" :id="id('arrivee-err')" class="fi-err">{{ err.arrivee }}</p>
|
||||
</fieldset>
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('dort_sur_place')">
|
||||
<legend>Je dors sur place</legend>
|
||||
<div class="fi-choix fi-choix--ligne">
|
||||
<label class="fi-option"><input v-model="f.dort_sur_place" type="radio" :name="id('dort')" :value="true"><span>Oui</span></label>
|
||||
<label class="fi-option"><input v-model="f.dort_sur_place" type="radio" :name="id('dort')" :value="false"><span>Non</span></label>
|
||||
</div>
|
||||
<p v-if="err.dort_sur_place" :id="id('dort_sur_place-err')" class="fi-err">{{ err.dort_sur_place }}</p>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<div class="fi-champ">
|
||||
<label :for="id('besoin')">Les repas sont végétariens. Un besoin particulier ? <span class="fi-facultatif">facultatif</span></label>
|
||||
<input :id="id('besoin')" v-model="f.besoin_alimentaire" v-bind="aria('besoin_alimentaire')" maxlength="300">
|
||||
<p v-if="err.besoin_alimentaire" :id="id('besoin_alimentaire-err')" class="fi-err">{{ err.besoin_alimentaire }}</p>
|
||||
</div>
|
||||
|
||||
<fieldset class="fi-champ" v-bind="ariaGroupe('voiture')">
|
||||
<legend>Covoiturage</legend>
|
||||
<div class="fi-choix">
|
||||
<label v-for="v in VOITURES" :key="v" class="fi-option">
|
||||
<input v-model="f.voiture" type="radio" :name="id('voiture')" :value="v">
|
||||
<span>{{ VOITURES_LABELS[v] }}</span>
|
||||
</label>
|
||||
</div>
|
||||
<p v-if="err.voiture" :id="id('voiture-err')" class="fi-err">{{ err.voiture }}</p>
|
||||
</fieldset>
|
||||
|
||||
<div class="fi-champ">
|
||||
<label :for="id('mot')">Un mot <span class="fi-facultatif">facultatif</span></label>
|
||||
<textarea :id="id('mot')" v-model="f.mot" v-bind="aria('mot')" rows="3" maxlength="1000" />
|
||||
<p v-if="err.mot" :id="id('mot-err')" class="fi-err">{{ err.mot }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Honeypot : invisible pour un humain, rempli par un robot -->
|
||||
<div class="fi-pot" aria-hidden="true">
|
||||
<label :for="id('site_web')">Site web</label>
|
||||
<input :id="id('site_web')" v-model="f.site_web" tabindex="-1" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<p v-if="page === 'codev'" class="fi-avant">Le lien de règlement vous arrive par email après l'inscription.</p>
|
||||
<p v-else class="fi-avant">Rien à régler.</p>
|
||||
|
||||
<p v-if="erreurEnvoi" class="fi-err fi-err--envoi" role="alert">{{ erreurEnvoi }}</p>
|
||||
|
||||
<button type="submit" class="evt-btn fi-envoyer" :disabled="etat === 'envoi'">
|
||||
{{ etat === 'envoi' ? 'Envoi…' : page === 'codev' ? 'Je m\'inscris' : 'Je viens planter' }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p :id="`fi-${page}-donnees`" class="fi-donnees">
|
||||
Ces informations servent seulement à organiser le séjour (repas, couchage, covoiturage).
|
||||
Elles sont effacées le 31 décembre 2026 et ne sont transmises à personne.
|
||||
Pour les modifier ou les effacer avant : <a :href="`mailto:${contact}`">{{ contact }}</a>.
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ARRIVEES_CODEV, DEPARTS_CODEV, ARRIVEES_FORET, ARRIVEES_FORET_LABELS, VOITURES, VOITURES_LABELS,
|
||||
InscriptionSchema, erreursParChamp, type PageInscription,
|
||||
} from '~/utils/inscriptionEvenement'
|
||||
|
||||
const props = defineProps<{
|
||||
page: PageInscription
|
||||
contact: string
|
||||
/** false : table non configurée, la page renvoie vers l'email. */
|
||||
disponible: boolean
|
||||
complet: boolean
|
||||
}>()
|
||||
const emit = defineEmits<{ inscrit: [] }>()
|
||||
|
||||
const f = reactive({
|
||||
prenom: '', nom: '', email: '', telephone: '',
|
||||
arrivee: '' as string, depart: '' as string, reste_plantation: false,
|
||||
nb_personnes: 1, nb_enfants: 0, dort_sur_place: undefined as boolean | undefined,
|
||||
besoin_alimentaire: '', voiture: '' as string, mot: '', site_web: '',
|
||||
})
|
||||
const err = ref<Record<string, string>>({})
|
||||
const etat = ref<'saisie' | 'envoi' | 'ok' | 'complet' | 'indisponible'>('saisie')
|
||||
const erreurEnvoi = ref('')
|
||||
const confirmation = ref<HTMLElement | null>(null)
|
||||
|
||||
const id = (k: string) => `fi-${props.page}-${k}`
|
||||
const aria = (k: string) => ({
|
||||
'aria-invalid': err.value[k] ? 'true' : undefined,
|
||||
'aria-describedby': err.value[k] ? id(`${k}-err`) : undefined,
|
||||
})
|
||||
const ariaGroupe = (k: string) => ({ 'aria-describedby': err.value[k] ? id(`${k}-err`) : undefined })
|
||||
|
||||
const JOURS: Record<string, string> = {
|
||||
'2026-11-21': 'Samedi 21', '2026-11-22': 'Dimanche 22', '2026-11-23': 'Lundi 23',
|
||||
'2026-11-25': 'Mercredi 25', '2026-11-26': 'Jeudi 26', '2026-11-27': 'Vendredi 27',
|
||||
}
|
||||
const jourLong = (d: string) => JOURS[d] ?? d
|
||||
|
||||
function corps() {
|
||||
const commun = {
|
||||
page: props.page, prenom: f.prenom, nom: f.nom, email: f.email, telephone: f.telephone,
|
||||
besoin_alimentaire: f.besoin_alimentaire, voiture: f.voiture, mot: f.mot, site_web: f.site_web,
|
||||
}
|
||||
return props.page === 'codev'
|
||||
? { ...commun, arrivee: f.arrivee, depart: f.depart, reste_plantation: f.reste_plantation }
|
||||
: { ...commun, nb_personnes: f.nb_personnes, nb_enfants: f.nb_enfants, arrivee: f.arrivee, dort_sur_place: f.dort_sur_place }
|
||||
}
|
||||
|
||||
function focusPremiereErreur() {
|
||||
nextTick(() => {
|
||||
const el = document.querySelector<HTMLElement>('.fi [aria-invalid="true"], .fi fieldset[aria-describedby] input')
|
||||
el?.focus()
|
||||
})
|
||||
}
|
||||
|
||||
async function envoyer() {
|
||||
erreurEnvoi.value = ''
|
||||
const body = corps()
|
||||
const parsed = InscriptionSchema.safeParse(body)
|
||||
if (!parsed.success) {
|
||||
err.value = erreursParChamp(parsed.error)
|
||||
focusPremiereErreur()
|
||||
return
|
||||
}
|
||||
err.value = {}
|
||||
etat.value = 'envoi'
|
||||
try {
|
||||
await $fetch('/api/evenements/inscription', { method: 'POST', body })
|
||||
etat.value = 'ok'
|
||||
emit('inscrit')
|
||||
nextTick(() => confirmation.value?.focus())
|
||||
} catch (e: any) {
|
||||
const code = e?.statusCode ?? e?.response?.status
|
||||
etat.value = 'saisie'
|
||||
if (code === 422 && e?.data?.data) {
|
||||
err.value = e.data.data
|
||||
focusPremiereErreur()
|
||||
} else if (code === 409) {
|
||||
etat.value = 'complet'
|
||||
} else if (code === 503) {
|
||||
etat.value = 'indisponible'
|
||||
} else if (code === 429) {
|
||||
erreurEnvoi.value = `Trop d'inscriptions depuis cette connexion aujourd'hui. Écrivez à ${props.contact}.`
|
||||
} else {
|
||||
erreurEnvoi.value = `L'inscription n'est pas passée. Réessayez dans un instant, ou écrivez à ${props.contact}.`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fi { margin-top: var(--space-lg); }
|
||||
form { display: flex; flex-direction: column; gap: var(--space-md); }
|
||||
.fi-duo { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
|
||||
@media (min-width: 480px) { .fi-duo { grid-template-columns: 1fr 1fr; } }
|
||||
|
||||
.fi-champ { display: flex; flex-direction: column; gap: var(--space-2xs); margin: 0; padding: 0; border: 0; min-width: 0; }
|
||||
.fi-champ > label, legend { font-weight: var(--fw-semibold); padding: 0; margin-bottom: var(--space-2xs); }
|
||||
.fi-facultatif { font-weight: var(--fw-regular); font-size: var(--fs-sm); color: var(--evt-attenue); }
|
||||
.fi-facultatif::before { content: '· '; }
|
||||
|
||||
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
|
||||
width: 100%;
|
||||
min-height: 48px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface);
|
||||
color: var(--text);
|
||||
font: inherit;
|
||||
font-size: 1rem; /* 16 px : iOS ne zoome pas */
|
||||
}
|
||||
textarea { min-height: 96px; resize: vertical; }
|
||||
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--text); }
|
||||
[aria-invalid="true"] { border-color: var(--danger) !important; }
|
||||
|
||||
.fi-choix { display: grid; gap: var(--space-xs); }
|
||||
.fi-choix--ligne { grid-template-columns: 1fr 1fr; }
|
||||
.fi-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm);
|
||||
min-height: 48px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--surface);
|
||||
font-weight: var(--fw-regular);
|
||||
cursor: pointer;
|
||||
}
|
||||
.fi-option:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
|
||||
.fi-option:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
|
||||
.fi-option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--nav-primary-solid); }
|
||||
.fi-option--case { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
|
||||
.fi-option--case input { margin-top: 2px; }
|
||||
|
||||
.fi-err { margin: 0; font-size: var(--fs-sm); color: var(--danger); font-weight: var(--fw-semibold); }
|
||||
.fi-err--envoi { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
|
||||
|
||||
.fi-pot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
|
||||
|
||||
.fi-avant { margin: 0; font-weight: var(--fw-semibold); }
|
||||
.fi-envoyer { align-self: flex-start; min-width: 200px; }
|
||||
@media (max-width: 479px) { .fi-envoyer { align-self: stretch; } }
|
||||
|
||||
.fi-message {
|
||||
padding: var(--space-lg);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.fi-message--ok { border: 2px solid var(--accent); }
|
||||
.fi-message:focus { outline: none; }
|
||||
.fi-message p { margin: 0; }
|
||||
.fi-message__titre { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--space-xs) !important; }
|
||||
|
||||
.fi-donnees { margin-top: var(--space-md); font-size: var(--fs-sm); color: var(--evt-attenue); }
|
||||
</style>
|
||||
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<figure class="evt-figure frise">
|
||||
<svg viewBox="0 0 540 132" role="img" aria-labelledby="frise-titre frise-desc">
|
||||
<title id="frise-titre">La semaine, jour par jour</title>
|
||||
<desc id="frise-desc">
|
||||
Samedi 21 et dimanche 22 : arrivée possible. Du lundi 23 au vendredi 27 : la semaine d'entraide.
|
||||
Samedi 28 et dimanche 29 : la plantation de la forêt.
|
||||
</desc>
|
||||
<g v-for="(j, i) in jours" :key="j.iso" :transform="`translate(${i * COL} 0)`">
|
||||
<text :x="COL / 2" y="20" class="frise__jour">{{ j.jour }}</text>
|
||||
<text :x="COL / 2" y="46" class="frise__num">{{ j.num }}</text>
|
||||
</g>
|
||||
<!-- 21-22 : arrivée possible -->
|
||||
<rect x="3" y="60" :width="2 * COL - 6" height="64" rx="8" class="frise__arrivee" />
|
||||
<text :x="COL" y="88" class="frise__label frise__label--ligne">arrivée</text>
|
||||
<text :x="COL" y="110" class="frise__label frise__label--ligne">possible</text>
|
||||
<!-- 23-27 : codev -->
|
||||
<rect :x="2 * COL + 3" y="60" :width="5 * COL - 6" height="64" rx="8" class="frise__codev" />
|
||||
<text :x="4.5 * COL" y="99" class="frise__label frise__label--codev">la semaine d'entraide</text>
|
||||
<!-- 28-29 : plantation -->
|
||||
<rect :x="7 * COL + 3" y="60" :width="2 * COL - 6" height="64" rx="8" class="frise__foret" />
|
||||
<text :x="8 * COL" y="99" class="frise__label frise__label--foret" style="font-size: 19px">plantation</text>
|
||||
</svg>
|
||||
<figcaption>
|
||||
Arrivée possible dès le samedi 21. Les 28 et 29, on plante une forêt :
|
||||
<NuxtLink :to="lienForet">→ la page forêt</NuxtLink>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { jourCourt } from '~/utils/evenements'
|
||||
|
||||
defineProps<{ lienForet: string }>()
|
||||
|
||||
const COL = 60
|
||||
const jours = Array.from({ length: 9 }, (_, i) => {
|
||||
const iso = `2026-11-${21 + i}`
|
||||
return { iso, ...jourCourt(iso) }
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.frise svg { border-radius: 0; overflow: visible; }
|
||||
.frise__jour { font-size: 19px; text-anchor: middle; fill: var(--evt-attenue); }
|
||||
.frise__num { font-size: 25px; font-weight: 700; text-anchor: middle; fill: var(--text); }
|
||||
.frise__arrivee { fill: var(--bg-alt); stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 5 4; }
|
||||
.frise__codev { fill: var(--evt-nuit); }
|
||||
.frise__foret { fill: var(--accent); }
|
||||
.frise__label { font-size: 21px; font-weight: 700; text-anchor: middle; }
|
||||
.frise__label--ligne { font-size: 18px; font-weight: 600; fill: var(--text); }
|
||||
.frise__label--codev { fill: var(--evt-sur-nuit); }
|
||||
.frise__label--foret { fill: var(--on-accent); }
|
||||
</style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<ol class="gestes" role="list">
|
||||
<li class="geste">
|
||||
<svg viewBox="0 0 200 150" aria-hidden="true">
|
||||
<path class="g-sol" d="M0 96 H64 Q100 132 136 96 H200 V150 H0 Z" />
|
||||
<path class="g-trou" d="M64 96 Q100 132 136 96" />
|
||||
<line class="g-tronc" x1="100" y1="112" x2="100" y2="34" />
|
||||
<ellipse class="g-houppe" cx="100" cy="30" rx="30" ry="20" />
|
||||
<path class="g-motte" d="M86 112 q14 14 28 0 q-14 -8 -28 0 Z" />
|
||||
<path class="g-fleche" d="M150 30 V78 M142 70 L150 80 L158 70" />
|
||||
</svg>
|
||||
<p><span class="geste__num">1</span>Les trous sont déjà faits : on met l'arbre principal en terre.</p>
|
||||
</li>
|
||||
<li class="geste">
|
||||
<svg viewBox="0 0 200 150" aria-hidden="true">
|
||||
<path class="g-sol" d="M0 92 H200 V150 H0 Z" />
|
||||
<line class="g-repere" x1="0" y1="92" x2="200" y2="92" />
|
||||
<line class="g-bouture" x1="78" y1="132" x2="82" y2="22" />
|
||||
<circle class="g-oeil" cx="81" cy="44" r="3.5" />
|
||||
<circle class="g-oeil" cx="79.6" cy="108" r="3.5" /><circle class="g-oeil" cx="79" cy="124" r="3.5" />
|
||||
<path class="g-cote" d="M122 92 V132 M116 92 H128 M116 132 H128" />
|
||||
<text x="134" y="117" class="g-texte">20 cm</text>
|
||||
</svg>
|
||||
<p><span class="geste__num">2</span>Les boutures autour : au moins deux yeux sous terre, 20 cm.</p>
|
||||
</li>
|
||||
<li class="geste">
|
||||
<svg viewBox="0 0 200 150" aria-hidden="true">
|
||||
<path class="g-sol" d="M0 112 H200 V150 H0 Z" />
|
||||
<path class="g-paille" d="M30 112 Q100 82 170 112 Z" />
|
||||
<path class="g-brins" d="M50 104 l14 -4 M78 96 l16 -2 M110 95 l14 3 M136 100 l14 5" />
|
||||
<line class="g-tronc" x1="100" y1="100" x2="100" y2="34" />
|
||||
<ellipse class="g-houppe" cx="100" cy="30" rx="26" ry="17" />
|
||||
<path class="g-grillage" d="M82 104 V44 M118 104 V44 M82 44 H118 M82 64 H118 M82 84 H118 M91 44 V104 M100 44 V58 M109 44 V104" />
|
||||
</svg>
|
||||
<p><span class="geste__num">3</span>La paille, et la protection contre les chevreuils.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.gestes { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
|
||||
@media (min-width: 560px) { .gestes { grid-template-columns: repeat(3, 1fr); } }
|
||||
.geste svg { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto var(--space-xs); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
|
||||
.geste p { margin: 0; font-size: var(--fs-sm); }
|
||||
.geste__num {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: var(--space-xs);
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--accent);
|
||||
color: var(--on-accent);
|
||||
font-weight: var(--fw-bold);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.g-sol { fill: var(--bg-alt); }
|
||||
.g-trou { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 4 4; }
|
||||
.g-tronc { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
|
||||
.g-houppe { fill: color-mix(in srgb, var(--nav-primary-solid) 20%, var(--surface)); stroke: var(--text); stroke-width: 2; }
|
||||
.g-motte { fill: color-mix(in srgb, var(--text) 45%, var(--bg-alt)); }
|
||||
.g-fleche { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.g-repere { stroke: var(--text); stroke-width: 2; }
|
||||
.g-bouture { stroke: var(--text); stroke-width: 5; stroke-linecap: round; }
|
||||
.g-oeil { fill: var(--accent); stroke: var(--text); stroke-width: 1.2; }
|
||||
.g-cote { fill: none; stroke: var(--text); stroke-width: 1.5; }
|
||||
.g-texte { font-size: 15px; font-weight: 700; fill: var(--text); }
|
||||
.g-paille { fill: var(--accent); opacity: 0.85; }
|
||||
.g-brins { stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; opacity: 0.6; }
|
||||
.g-grillage { fill: none; stroke: var(--text); stroke-width: 1.3; opacity: 0.75; }
|
||||
</style>
|
||||
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div class="evt">
|
||||
<div class="evt__col">
|
||||
<nav v-if="retour" class="evt-retour" aria-label="Retour">
|
||||
<NuxtLink :to="retour.to">← {{ retour.label }}</NuxtLink>
|
||||
</nav>
|
||||
<main id="contenu">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{ retour?: { to: string; label: string } }>()
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Gabarit des pages d'événement (lot Y) : colonne de lecture de 640 px, plus d'air que l'app.
|
||||
Styles non scopés, préfixe evt- : partagés par les pages et les composants evenements/.
|
||||
Tokens du DS (tokens.css + theme/aep.css) ; safran (--accent) réservé à la plantation
|
||||
et au bouton principal ; bleu nuit plein = --nav-primary-solid.
|
||||
-->
|
||||
<style>
|
||||
.evt {
|
||||
--evt-attenue: color-mix(in srgb, var(--text) 78%, transparent);
|
||||
--evt-nuit: var(--nav-primary-solid);
|
||||
--evt-sur-nuit: var(--nav-text-on-primary);
|
||||
min-height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font-body);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.evt__col {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-lg) var(--space-md) var(--space-3xl);
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.evt__col { padding: var(--space-2xl) var(--space-lg) var(--space-3xl); }
|
||||
}
|
||||
|
||||
.evt a { color: var(--link); text-underline-offset: 3px; }
|
||||
.evt a:hover { color: var(--link-hover); }
|
||||
.evt :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
|
||||
|
||||
.evt-retour { margin-bottom: var(--space-lg); font-size: var(--fs-sm); }
|
||||
.evt-retour a { color: var(--evt-attenue); text-decoration: none; }
|
||||
.evt-retour a:hover { color: var(--text); text-decoration: underline; }
|
||||
|
||||
/* ── En-tête ── */
|
||||
.evt-tete { margin-bottom: var(--space-xl); }
|
||||
.evt-h1 {
|
||||
font-size: clamp(1.85rem, 6.5vw, 2.6rem);
|
||||
line-height: 1.15;
|
||||
letter-spacing: -0.015em;
|
||||
font-weight: var(--fw-bold);
|
||||
margin: 0 0 var(--space-md);
|
||||
text-wrap: balance;
|
||||
}
|
||||
.evt-sous {
|
||||
font-size: var(--fs-lg);
|
||||
font-weight: var(--fw-semibold);
|
||||
margin: 0 0 var(--space-2xs);
|
||||
}
|
||||
.evt-lieu { color: var(--evt-attenue); margin: 0; }
|
||||
.evt-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-sm) var(--space-md);
|
||||
margin-top: var(--space-lg);
|
||||
}
|
||||
|
||||
/* ── Sections ── */
|
||||
.evt-section { margin-top: var(--space-3xl); }
|
||||
.evt-h2 {
|
||||
font-size: var(--fs-xl);
|
||||
line-height: 1.25;
|
||||
font-weight: var(--fw-bold);
|
||||
margin: 0 0 var(--space-md);
|
||||
text-wrap: balance;
|
||||
}
|
||||
.evt-h3 { font-size: var(--fs-base); font-weight: var(--fw-bold); margin: 0 0 var(--space-xs); }
|
||||
.evt p { margin: 0 0 var(--space-md); }
|
||||
.evt-note { font-size: var(--fs-sm); color: var(--evt-attenue); }
|
||||
.evt-citation-source { font-size: var(--fs-sm); color: var(--evt-attenue); margin-top: calc(-1 * var(--space-xs)); }
|
||||
|
||||
/* ── Boutons ── */
|
||||
.evt-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-xs);
|
||||
min-height: 48px;
|
||||
padding: 0 var(--space-lg);
|
||||
border: 0;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--accent);
|
||||
color: var(--on-accent);
|
||||
font: inherit;
|
||||
font-weight: var(--fw-bold);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.evt a.evt-btn { color: var(--on-accent); }
|
||||
.evt-btn:hover { filter: brightness(0.96); }
|
||||
.evt-btn[disabled] { opacity: 0.6; cursor: progress; }
|
||||
|
||||
/* ── Cartes (pratique, venir) ── */
|
||||
.evt-cartes { display: grid; gap: var(--space-sm); grid-template-columns: 1fr; }
|
||||
@media (min-width: 560px) { .evt-cartes--2 { grid-template-columns: 1fr 1fr; } }
|
||||
.evt-carte {
|
||||
padding: var(--space-md) var(--space-md) var(--space-sm);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.evt-carte p:last-child { margin-bottom: var(--space-xs); }
|
||||
|
||||
/* ── Figures ── */
|
||||
.evt-figure { margin: var(--space-lg) 0; }
|
||||
.evt-figure img, .evt-figure svg { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
|
||||
.evt-figure figcaption { margin-top: var(--space-xs); font-size: var(--fs-sm); color: var(--evt-attenue); }
|
||||
.evt-pleine { margin-left: calc(-1 * var(--space-md)); margin-right: calc(-1 * var(--space-md)); }
|
||||
.evt-pleine img { border-radius: 0; }
|
||||
.evt-pleine figcaption { padding: 0 var(--space-md); }
|
||||
@media (min-width: 672px) {
|
||||
.evt-pleine { margin-left: 0; margin-right: 0; }
|
||||
.evt-pleine img { border-radius: var(--radius-md); }
|
||||
.evt-pleine figcaption { padding: 0; }
|
||||
}
|
||||
|
||||
/* ── Dépliables ── */
|
||||
.evt-details {
|
||||
margin-top: var(--space-md);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.evt-details > summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-sm);
|
||||
min-height: 52px;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
font-weight: var(--fw-bold);
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
}
|
||||
.evt-details > summary::-webkit-details-marker { display: none; }
|
||||
.evt-details > summary::after {
|
||||
content: '+';
|
||||
flex: none;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--bg-alt);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.evt-details[open] > summary::after { content: '−'; }
|
||||
.evt-details__corps { padding: 0 var(--space-md) var(--space-md); }
|
||||
|
||||
/* ── Listes ── */
|
||||
.evt-liste { margin: 0 0 var(--space-md); padding-left: 1.2em; }
|
||||
.evt-liste li { margin-bottom: var(--space-xs); }
|
||||
.evt-deroule { margin: 0; padding: 0; list-style: none; border-left: 3px solid var(--accent); }
|
||||
.evt-deroule li { padding: 0 0 var(--space-md) var(--space-md); }
|
||||
.evt-deroule strong { display: block; }
|
||||
|
||||
/* ── Encadré ── */
|
||||
.evt-encadre {
|
||||
padding: var(--space-md);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--bg-alt);
|
||||
}
|
||||
.evt-encadre p:last-child { margin-bottom: 0; }
|
||||
|
||||
/* ── Pied ── */
|
||||
.evt-pied {
|
||||
margin-top: var(--space-3xl);
|
||||
padding-top: var(--space-lg);
|
||||
border-top: 1px solid var(--border);
|
||||
font-size: var(--fs-sm);
|
||||
}
|
||||
.evt-pied p { margin-bottom: var(--space-xs); }
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<footer class="evt-pied">
|
||||
<slot />
|
||||
<p>Contact : <a :href="`mailto:${contact}`">{{ contact }}</a></p>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{ contact: string }>()
|
||||
</script>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<figure class="evt-figure strates">
|
||||
<svg viewBox="0 0 560 300" role="img" aria-labelledby="strates-titre strates-desc">
|
||||
<title id="strates-titre">Les étages de la forêt</title>
|
||||
<desc id="strates-desc">
|
||||
De haut en bas : la strate haute, les grands arbres ; la strate moyenne, les fruitiers ;
|
||||
la strate basse, les petits fruits et les boutures ; au sol, la consoude.
|
||||
</desc>
|
||||
<!-- repères d'étage -->
|
||||
<g class="strates__repere">
|
||||
<line x1="0" x2="560" y1="58" y2="58" />
|
||||
<line x1="0" x2="560" y1="138" y2="138" />
|
||||
<line x1="0" x2="560" y1="208" y2="208" />
|
||||
</g>
|
||||
<g class="strates__etiquette">
|
||||
<text x="4" y="50">haute</text>
|
||||
<text x="4" y="130">moyenne</text>
|
||||
<text x="4" y="200">basse</text>
|
||||
<text x="4" y="262">herbacée</text>
|
||||
</g>
|
||||
|
||||
<!-- sol -->
|
||||
<path class="strates__sol" d="M0 268 Q140 262 280 268 T560 266 V300 H0 Z" />
|
||||
|
||||
<!-- haute : grand arbre -->
|
||||
<g class="strates__arbre strates__arbre--haut">
|
||||
<line x1="440" y1="268" x2="440" y2="96" />
|
||||
<line x1="440" y1="150" x2="410" y2="118" /><line x1="440" y1="132" x2="472" y2="104" />
|
||||
<ellipse cx="440" cy="62" rx="76" ry="48" />
|
||||
</g>
|
||||
<!-- moyenne : fruitier -->
|
||||
<g class="strates__arbre strates__arbre--moyen">
|
||||
<line x1="300" y1="268" x2="300" y2="166" />
|
||||
<ellipse cx="300" cy="142" rx="54" ry="34" />
|
||||
<circle class="strates__fruit" cx="282" cy="150" r="5" /><circle class="strates__fruit" cx="318" cy="138" r="5" /><circle class="strates__fruit" cx="304" cy="158" r="5" />
|
||||
</g>
|
||||
<!-- basse : arbuste + bouture -->
|
||||
<g class="strates__arbre strates__arbre--bas">
|
||||
<line x1="190" y1="268" x2="190" y2="226" />
|
||||
<ellipse cx="190" cy="214" rx="36" ry="22" />
|
||||
<circle class="strates__fruit" cx="178" cy="220" r="4" /><circle class="strates__fruit" cx="198" cy="210" r="4" />
|
||||
<line class="strates__bouture" x1="244" y1="268" x2="248" y2="216" />
|
||||
<path class="strates__feuille" d="M248 222 q10 -6 14 -16 q-12 2 -14 16 Z M247 234 q-10 -4 -14 -14 q12 1 14 14 Z" />
|
||||
</g>
|
||||
<!-- herbacée : consoude -->
|
||||
<g class="strates__herbe" transform="translate(40 0)">
|
||||
<path d="M110 268 q-14 -18 -20 -34 q14 8 20 34 Z" />
|
||||
<path d="M112 268 q2 -24 10 -40 q4 18 -10 40 Z" />
|
||||
<path d="M116 268 q14 -14 28 -22 q-6 16 -28 22 Z" />
|
||||
</g>
|
||||
<!-- paille au sol -->
|
||||
<path class="strates__paille" d="M60 268 l18 -4 M150 267 l22 -3 M340 268 l20 -4 M500 267 l24 -3" />
|
||||
</svg>
|
||||
</figure>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.strates svg { background: var(--surface); border: 1px solid var(--border); }
|
||||
.strates__repere line { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 4 6; }
|
||||
.strates__etiquette text { font-size: 20px; font-weight: 700; fill: var(--evt-attenue); }
|
||||
.strates__sol { fill: var(--bg-alt); }
|
||||
.strates__arbre line, .strates__bouture { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
|
||||
.strates__arbre ellipse { stroke: var(--text); stroke-width: 2; }
|
||||
.strates__arbre--haut ellipse { fill: color-mix(in srgb, var(--nav-primary-solid) 30%, var(--surface)); }
|
||||
.strates__arbre--moyen ellipse { fill: color-mix(in srgb, var(--nav-primary-solid) 18%, var(--surface)); }
|
||||
.strates__arbre--bas ellipse { fill: color-mix(in srgb, var(--nav-primary-solid) 10%, var(--surface)); }
|
||||
.strates__fruit { fill: var(--accent); stroke: var(--text); stroke-width: 1; }
|
||||
.strates__feuille, .strates__herbe path { fill: color-mix(in srgb, var(--nav-primary-solid) 22%, var(--surface)); stroke: var(--text); stroke-width: 1.5; }
|
||||
.strates__bouture { stroke-width: 3; }
|
||||
.strates__paille { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user