Skip to content

Commit

Permalink
chore-email: On Cohort Subscription Copy updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nomadbitcoin committed Sep 25, 2024
1 parent 1496e5f commit cc50400
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 67 deletions.
199 changes: 199 additions & 0 deletions functions/email_templates/cohort_signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=640" />

<link
href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;700&display=swap"
rel="stylesheet"
/>

<style type="text/css">
body,
td {
font-family: 'Barlow', sans-serif;
font-size: 14px;
color: #000000;
}

p {
line-height: 22px;
color: #000000;
}

.small {
font-size: 12px;
color: #000000;
}

.button {
background-color: #7864fa;
border: none;
color: white;
padding: 15px 30px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-weight: bold;
margin: 10px 0;
cursor: pointer;
border-radius: 5px;
font-family: 'Barlow', sans-serif;
transition: background-color 0.3s ease;
}

.button:hover {
background-color: #96e150;
}

.footer-image {
display: block;
margin: 20px auto;
max-width: 200px;
}

a {
color: #007bff;
text-decoration: underline;
}

@media only screen and (max-width: 600px) {
.button {
font-size: 14px;
padding: 10px 20px;
}
}

.container {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
max-width: 600px;
margin: 0 auto;
color: #000000;
}

hr {
border: none;
border-top: 1px solid #dddddd;
margin: 20px 0;
}

.footer-links {
text-align: center;
margin-top: 20px;
}

.footer-links a {
color: #007bff;
text-decoration: none;
font-size: 14px;
}

.footer-links a:hover {
text-decoration: underline;
}

.footer-links span {
margin: 0 5px;
color: #999999;
}
</style>
</head>

<body bgcolor="#F2F2F2">
<div class="container">
<p>
Hello builder 👷👷‍♀️!! Yan Luiz (@nomadbitcoin) from WEB3DEV here.<br /><br />
You have been enrolled in the build "<strong>{{course_title}}</strong>". The build starts
with the kickoff live session on <strong>{{kickoff_start_time}}</strong> BRT. To join, just
head over to <a href="https://www.youtube.com/@web3dev">our YouTube channel</a>.<br /><br />
<b>This project is almost entirely asynchronous.</b> The only live moment will be our
kickoff session. If you can't attend, don't worry. It will be recorded and made available
for you to watch!<br /><br />
The build material will be officially released at 7 PM, along with the live session
<a href="https://build.w3d.community/courses/{{course_id}}">here</a>.<br />
</p>

<h3>Some important information</h3>
<ol>
<li>
If you finish the project by <strong>{{end_date}}</strong> BRT, you will be eligible to
receive an <b>exclusive NFT</b>. We will grant you the #graduated role on our Discord, and
you'll have access to web3 job opportunities from our partners.
</li>
<li>
Don't forget to connect your Discord on the
<a href="https://build.w3d.community/courses/{{course_id}}">builds platform</a>, as we
need to add you to the channel "✦ Builds ✦" so you can chat with other students.
</li>
</ol>

<p>
If you have any questions, post them in the #chat-builds channel.<br /><br />
I'm excited to see everyone's project 💜💜💜.<br /><br />
Yan Luiz (@nomadbitcoin)
</p>

<hr />

<p>
Fala builder 👷👷‍♀️!! Yan Luiz (@nomadbitcoin) da WEB3DEV aqui.<br /><br />
Sua inscrição foi feita no build "<strong>{{course_title}}</strong>". O build começa com a
live de kickoff em <strong>{{kickoff_start_time}}</strong> BRT. Para acompanhar é só entrar
no <a href="https://www.youtube.com/@web3dev">nosso YouTube</a>.<br /><br />
<b>Esse projeto é praticamente todo assíncrono.</b> O único momento ao vivo será nossa live.
Se não puder participar, não se preocupe. Ela também será gravada e disponibilizada para
você assistir!<br /><br />
O material do build será aberto oficialmente às 19h, junto com a live
<a href="https://build.w3d.community/courses/{{course_id}}">aqui</a>.<br />
</p>

<h3>Algumas informações importantes</h3>
<ol>
<li>
Se você terminar o projeto até <strong>{{end_date}}</strong> BRT, você terá direito a
receber um <b>NFT exclusivo</b>. Vamos dar para você o cargo de #graduad@ no nosso Discord
e terá acesso a vagas de trabalho web3 em nossos parceiros.
</li>
<li>
Não se esqueça de conectar seu Discord na
<a href="https://build.w3d.community/courses/{{course_id}}">plataforma de builds</a>, pois
precisamos adicionar você no canal "✦ Builds ✦" para você poder conversar com as outras
pessoas que estão estudando junto com você.
</li>
</ol>

<p>
Se tiver perguntas, mande no canal #chat-builds.<br /><br />
Estou animado para ver o projeto de todo mundo 💜💜💜.<br /><br />
Yan Luiz (@nomadbitcoin)
</p>

<div class="footer-links">
<a href="https://twitter.com/web3dev_" target="_blank">Twitter</a>
<span>|</span>
<a href="https://pt.discord.w3d.community" target="_blank">Discord</a>
<span>|</span>
<a href="https://github.com/w3b3d3v" target="_blank">GitHub</a>
<span>|</span>
<a href="https://www.linkedin.com/company/w3d-community" target="_blank">LinkedIn</a>
<span>|</span>
<a href="https://www.youtube.com/@web3dev" target="_blank">YouTube</a>
<span>|</span>
<a href="https://pt.w3d.community/" target="_blank">Forum</a>
<span>|</span>
<a href="https://pt.glossario.w3d.community/" target="_blank">Glossary</a>
</div>

<hr style="border: none; border-top: 1px solid #ddd; margin: 20px 0; clear: both" />

<img
src="https://firebasestorage.googleapis.com/v0/b/web3dev-bootcamp.appspot.com/o/w3d-logo-hor.png?alt=media&token=6e334502-8535-46e9-84df-ffb0412b460b"
alt="WEB3DEV Logo"
class="footer-image"
/>
</div>
</body>
</html>
81 changes: 14 additions & 67 deletions functions/email_templates/on_cohort_signup.js
Original file line number Diff line number Diff line change
@@ -1,76 +1,23 @@
function d(date) {
function formatDate(date) {
return new Date(date._seconds * 1000).toLocaleString('pt-BR', {
timeZone: 'America/Sao_Paulo',
})
}

const fs = require('fs')
const path = require('path')

function template(params) {
return `
<!DOCTYPE html>
Hello builder 👷👷‍♀️!! danicuki from WEB3DEV here.<br>
<br>
You have been enrolled in the build "${
params.course.title
}". The build starts with the kickoff live session on ${d(
params.cohort.kickoffStartTime
)} BRT. To join, just head over to <a href="https://www.twitch.tv/web3dev">our Twitch</a>.<br>
<br>
<br>This project is almost entirely asynchronous.</b> The only live moment will be our kickoff session. If you can't attend, don't worry. It will be recorded and made available for you to watch!<br>
<br>
<br>The build material will be officially released at 7 PM, along with the live session <a href="https://build.w3d.community/courses/${
params.cohort.course_id
}">here</a> <br>
<br>
const htmlContent = fs.readFileSync(path.join(__dirname, 'cohort_signup.html'), 'utf8')

// Replace placeholders in the HTML content with actual values
let formattedContent = htmlContent
.replace(/{{course_title}}/g, params.course.title)
.replace(/{{kickoff_start_time}}/g, formatDate(params.cohort.kickoffStartTime))
.replace(/{{course_id}}/g, params.cohort.course_id)
.replace(/{{end_date}}/g, formatDate(params.cohort.endDate))

<h3>Some important information</h3>
1. If you finish the project by ${d(
params.cohort.endDate
)} BRT, you will be eligible to receive an <b>exclusive NFT</b>. We will grant you the #graduated role on our Discord, and you'll have access to web3 job opportunities from our partners.<br>
<br>
2. Don't forget to connect your Discord on the <a href="https://build.w3d.community/courses/${
params.cohort.course_id
}">builds platform</a>, as we need to add you to the channel "═══════ ✦ Builds ✦ ══════" so you can chat with other students.<br>
<br>
3. Please don't call this a "course"! It's a project, bootcamp, hackday, call it what you want. I just want you to do some cool work with a bit of guidance :-).<br>
<br>
If you have any questions, post them in the #chat-builds channel.<br>
<br>
I'm excited to see everyone's project 💜💜💜.<br>
<br>
Danicuki
<br>
<hr>
<br>
Fala builder 👷👷‍♀️!! danicuki da web3dev aqui.<br>
<br>
Sua inscrição foi feita no build "${
params.course.title
}".&nbsp; O build começa com a live de kickoff em ${d(
params.cohort.kickoffStartTime
)} BRT. Para acompanhar é só entrar no <a href="https://www.twitch.tv/web3dev">nosso Twitch</a>.<br>
<br>
<b>Esse projeto é praticamente todo assíncrono.</b>&nbsp;O único momento ao vivo será nossa live. Se não puder participar, não se preocupe. Ela também será gravada e disponibilizada para você assistir!<br>
<br>
<br>O material do build será aberto oficialmente às 19h, junto com a live <a href="https://build.w3d.community/courses/${
params.cohort.course_id
}">aqui</a>&nbsp;<br>
<br>
<h3>Algumas informações importantes</h3>
1. Se você terminar o projeto até ${d(
params.cohort.endDate
)} BRT, você terá direito a receber um <b>NFT exclusivo</b>. Vamos dar para você o cargo de #graduad@ no nosso Discord e terá acesso a vagas de trabalho web3 em nossos parceiros.<br>
<br>
2. Não se esqueça de conectar seu Discord na <a href="https://build.w3d.community/courses/${
params.cohort.course_id
}">plataforma de builds</a>, pois precisamos adicionar você no canal "═══════ ✦ Builds ✦ ══════" para você poder conversar com as outras pessoas que estão estudando junto com você.<br>
<br>
3. Por favor, não chama isso de "curso"! É um projeto, bootcamp, hackday, chama do que quiser. Só quero que você faça um trabalho legal com um pouco de guia :-).<br>
<br>
Se tiver perguntas, mande no canal #chat-builds.<br>
<br>
Estou animado para ver o projeto de todo mundo 💜💜💜.<br>
<br>
danicuki
`
return formattedContent
}

module.exports = template

0 comments on commit cc50400

Please sign in to comment.