diff --git a/src/_includes/layouts/member.njk b/src/_includes/layouts/member.njk index 745d183..0295c4c 100644 --- a/src/_includes/layouts/member.njk +++ b/src/_includes/layouts/member.njk @@ -53,6 +53,12 @@ Voir tous les membres + {% if emailSlug %} + {% set contactMember = emailSlug %} + {% elif url %} + {% set contactMember = url | replace("/members/","") %} + {% endif %} + {% set contactTitle = ["Écrire à ",name] | join %} {% include "partials/components/contact-form.njk" %} {% endblock %} diff --git a/src/_includes/partials/components/contact-form.njk b/src/_includes/partials/components/contact-form.njk index aee53c1..10c55c6 100644 --- a/src/_includes/partials/components/contact-form.njk +++ b/src/_includes/partials/components/contact-form.njk @@ -1,12 +1,14 @@ {% from "macros/form.njk" import label, field, select, option, textarea, checkboxes, button, hidden_field %} - {% if not contactMember %} + {% if not removeWave %} {% endif %} {% if not contactMember %} Nous contacter + {% elif contactTitle %} + {{ contactTitle }} {% endif %} diff --git a/src/members-contact.njk b/src/members-contact.njk index 3ad8659..fff0f7c 100644 --- a/src/members-contact.njk +++ b/src/members-contact.njk @@ -31,6 +31,7 @@ permalink: '/members/{{ member.fileSlug }}/contact/' {% else %} {% set contactMember = member.fileSlug | replace("-",".") %} {% endif %} + {% set removeWave = true %} {% include "partials/components/contact-form.njk" %}