113 lines
3.3 KiB
JavaScript
113 lines
3.3 KiB
JavaScript
const template = require('lodash.template')
|
||
|
||
const bodyTemplate = template(`
|
||
<!DOCTYPE html>
|
||
<html lang="fr">
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Confirmation don <%= amount %> €. Merci pour votre soutien</title>
|
||
<style>
|
||
body {
|
||
background-color: #F5F6F7;
|
||
color: #234361;
|
||
font-family: "SF UI Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||
margin: auto;
|
||
padding: 25px;
|
||
}
|
||
|
||
a {
|
||
text-decoration: none;
|
||
}
|
||
|
||
button {
|
||
background-color: #003b80;
|
||
border: none;
|
||
border-radius: 3px;
|
||
padding: 10px;
|
||
}
|
||
|
||
img {
|
||
max-height: 45px;
|
||
background-color: #F5F6F7;
|
||
}
|
||
|
||
.bal {
|
||
font-size: 25px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.container {
|
||
background-color: #ebeff3;
|
||
padding: 25px;
|
||
}
|
||
|
||
.forceWhiteLink button a {
|
||
color:#FFF!important;
|
||
}
|
||
|
||
.infos {
|
||
margin-top: 35px;
|
||
}
|
||
|
||
.title {
|
||
align-items: center;
|
||
border-bottom: 1px solid #E4E7EB;
|
||
justify-content: center;
|
||
margin-top: 35px;
|
||
min-height: 10em;
|
||
padding: 10px;
|
||
text-align: center;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
<div>
|
||
<img src="https://oki.re/oki-logo-72x72.png" alt="Logo #OKi">
|
||
</div>
|
||
<div class="title">
|
||
<h2 style="margin:0; mso-line-height-rule:exactly;">Merci !</h2><br>
|
||
<h3 style="margin:0; mso-line-height-rule:exactly;">Votre soutien à #OKi est important et nous vous en sommes très reconnaissant ❤️</h3>
|
||
</div>
|
||
|
||
<div class="container">
|
||
<section>
|
||
<h4>Une aide indispensable</h4>
|
||
<p>
|
||
En effet, ce sont les dons qui nous permettent de maintenir tous les services liés à #OKi.
|
||
</p>
|
||
<p>
|
||
Toute contribution, aussi modeste soit-elle, nous permet d’augmenter nos capacités.<br />
|
||
</p>
|
||
<p>Pour rappel, voici la liste des services que nous hébergeons :</p>
|
||
<ul>
|
||
<li><span class="forceWhiteLink"><button><a href="https://pale.o-k-i.net/timeline/local" target="blank">Palé</a></button></span> 🗣️</li>
|
||
<li><span class="forceWhiteLink"><button><a href="https://gade.o-k-i.net" target="blank">Gadé</a></button></span> 📺</li>
|
||
<li><span class="forceWhiteLink"><button><a href="https://mobilize.o-k-i.net" target="blank">Mobilizé</a></button></span> 🤝</li>
|
||
<li><span class="forceWhiteLink"><button><a href="https://mizik.o-k-i.net" target="blank">Mizik</a></button></span> 🎶</li>
|
||
<li><span class="forceWhiteLink"><button><a href="https://nouvel.o-k-i.net" target="blank">Nouvèl</a></button></span> 📰</li>
|
||
</ul>
|
||
</section>
|
||
</div>
|
||
</body>
|
||
|
||
<footer>
|
||
<p>Pour toute question, n’hésitez pas à nous contacter en répondant à ce courriel.</p>
|
||
<p>Merci infiniment pour votre soutien.</p>
|
||
|
||
<span><i><span class="forceWhiteLink"><button><a href="https://oki.re" target="blank">#OKi - Organisation KA Internationale</a></button></span></i></span>
|
||
</footer>
|
||
</html>
|
||
`)
|
||
|
||
function formatEmail(amount) {
|
||
return {
|
||
subject: `Confirmation don ${amount} €. Merci pour votre soutien`,
|
||
html: bodyTemplate({amount})
|
||
}
|
||
}
|
||
|
||
module.exports = formatEmail
|