index-main/site/templates/newsletter.php
isUnknown 9c9a2fd40a feat: newsletter form fonctionnel via Brevo
- Route Kirby `api/newsletter` (proxy vers l'API Brevo) dans site/config/routes/newsletter.php
- JS de soumission du formulaire dans assets/js/newsletter-brevo.js
- Chargement du script dans le template newsletter.php
- Clé API dans config.index.ngo.php (gitignored)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 15:12:35 +01:00

40 lines
1.5 KiB
PHP
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.

<?php snippet('header') ?>
<script src="<?= url('assets/js/newsletter-brevo.js') ?>"></script>
<main class="main__single">
<header class="page__header">
<h2 class="page__title"><?= $page->title()->esc() ?></h2>
</header>
<div class="page__content">
<?php if ($page->chapo()->isNotEmpty()): ?>
<div class="description">
<p><?= $page->chapo() ?></p>
</div>
<?php endif ?>
<form class="form__newsletter">
<input type="email" name="email" placeholder="Votre adresse e-mail" required="">
<button class="btn--newsletter" type="submit" aria-label="sinscrire">
<span class="txt">Sinscrire</span>
<span class="icon">
<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="m14.523 18.787s4.501-4.505 6.255-6.26c.146-.146.219-.338.219-.53s-.073-.383-.219-.53c-1.753-1.754-6.255-6.258-6.255-6.258-.144-.145-.334-.217-.524-.217-.193 0-.385.074-.532.221-.293.292-.295.766-.004 1.056l4.978 4.978h-14.692c-.414 0-.75.336-.75.75s.336.75.75.75h14.692l-4.979 4.979c-.289.289-.286.762.006 1.054.148.148.341.222.533.222.19 0 .378-.072.522-.215z" fill-rule="nonzero"></path>
</svg>
</span>
</button>
</form>
<?php if ($page->details()->isNotEmpty()): ?>
<div class="details">
<p><?= $page->details() ?></p>
</div>
<?php endif ?>
</div>
</main>
<?php snippet('footer') ?>