81 lines
No EOL
2.4 KiB
PHP
81 lines
No EOL
2.4 KiB
PHP
</main>
|
|
<footer class="main-footer">
|
|
<div class="first-column">
|
|
<h1 class="logo">
|
|
<span>Nouveau</span>
|
|
<span>Théâtre</span>
|
|
<span>Besançon</span>
|
|
</h1>
|
|
</div>
|
|
<div
|
|
x-data="{
|
|
btnMsg: 's\'inscrire',
|
|
submit(event) {
|
|
event.preventDefault()
|
|
|
|
const email = this.$refs.emailInput.value;
|
|
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
|
|
if (emailRegex.test(email)) {
|
|
const options = {
|
|
method: 'POST',
|
|
body: JSON.stringify({
|
|
email
|
|
})
|
|
}
|
|
|
|
fetch('/brevo-create-contact.json', options)
|
|
.then(res => res.json())
|
|
.then(json => {
|
|
console.log(json)
|
|
this.$refs.emailInput.value = 'Vous êtes inscrit !'
|
|
this.$refs.emailSubmit.setAttribute('disabled', 'true')
|
|
})
|
|
} else {
|
|
this.btnMsg = 'email invalide'
|
|
this.$refs.emailInput.value = ''
|
|
setTimeout(() => {
|
|
this.btnMsg = 'réessayer'
|
|
}, 2000)
|
|
}
|
|
}
|
|
}"
|
|
>
|
|
<p>S'inscrire à la newsletter</p>
|
|
<form action="">
|
|
<input placeholder="e-mail" type="email" name="email" autocomplete="email" id="email" x-ref="emailInput">
|
|
<button type="submit" @click="submit" x-ref="emailSubmit">→</button>
|
|
</form>
|
|
</div>
|
|
<div class="main-footer__infos">
|
|
<?= $site->footerInfos() ?>
|
|
</div>
|
|
|
|
<div class="main-footer__socials">
|
|
<div>
|
|
<p>
|
|
Centre dramatique national<br>
|
|
Direction Tommy Milliot
|
|
</p>
|
|
</div>
|
|
<p><strong>Suivez nous</strong></p>
|
|
<ul class="social-icons">
|
|
<li>
|
|
<a href="<?= $site->instagram() ?>" class="invert" target="_blank" title="Voir la page Instagram du NTB">
|
|
<span class="sr-only">Voir la page Instagram du NTB</span>
|
|
<?= svg('assets/images/icons/instagram.svg') ?>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<?= $site->facebook() ?>" class="invert" target="_blank" title="Voir la page Facebook du NTB">
|
|
<span class="sr-only">Voir la page Facebook du NTB</span>
|
|
<?= svg('assets/images/icons/facebook.svg') ?>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<a href="<?= page('informations')->url() ?>#mentions-legales">Mentions légales</a>
|
|
</div>
|
|
</footer>
|
|
<?php snippet('seo/schemas'); ?>
|
|
</body>
|
|
</html>
|