Skip to content

Commit

Permalink
ch: change deployment command (#191)
Browse files Browse the repository at this point in the history
ch: use secret variable
  • Loading branch information
ceelogre committed Jun 27, 2024
1 parent 7752fe9 commit 2e53fb4
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 68 deletions.
29 changes: 14 additions & 15 deletions src/helpers/emailTemplate.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function generateTemplate({
message: string
title?: string
}) {
return /* html */ `
return `
<!DOCTYPE html>
<html lang="en-US">
<head>
Expand All @@ -16,13 +16,13 @@ export default function generateTemplate({
text-decoration: underline !important;
}
* {
margin: 0px;
margin-top: 0px;
}
</style>
</head>
<body style="margin: 0px; background-color: #f2f3f8">
<body style="margin: 0px; background-color: #d3d3d3">
<table
style="background-color: #f2f3f8; max-width: 670px; margin: 0 auto"
style="background-color: #d3d3d3; max-width: 670px; margin: 0"
width="100%"
border="0"
align="center"
Expand All @@ -34,12 +34,11 @@ export default function generateTemplate({
"
>
<tr>
<td style="height: 80px">&nbsp;</td>
<td style="height: 20px">&nbsp;</td>
</tr>
<tr>
<td style="text-align: center">
<a href="${process.env.FRONTEND_LINK}" target="_blank">
<img src="${process.env.FRONTEND_LINK}/images/logo.png" />
<a href="${process.env.FRONTEND_LINK}" target="_blank">
</a>
</td>
</tr>
Expand All @@ -54,10 +53,10 @@ export default function generateTemplate({
cellpadding="0"
cellspacing="0"
style="
max-width: 670px;
margin-left: 30px;
margin-right: 30px;
background: #fff;
max-width: 100%;
margin-left: 0px;
margin-right: 0px;
background: #d3d3d3;
border-radius: 3px;
text-align: center;
-webkit-box-shadow: 0 6px 18px 0 rgba(0, 0, 0, 0.06);
Expand All @@ -66,13 +65,13 @@ export default function generateTemplate({
"
>
<tr>
<td style="height: 40px">&nbsp;</td>
<td style="height: 20px">&nbsp;</td>
</tr>
<tr>
<td style="padding-left: 30px; padding-right: 30px">${message}</td>
<td style="padding-left: 20px; padding-right: 10px">${message}</td>
</tr>
<tr>
<td style="height: 40px">&nbsp;</td>
<td style="height: 20px">&nbsp;</td>
</tr>
</table>
</td>
Expand All @@ -81,7 +80,7 @@ export default function generateTemplate({
<td style="height: 20px">&nbsp;</td>
</tr>
<tr>
<td style="height: 80px">&nbsp;</td>
<td style="height: 20px">&nbsp;</td>
</tr>
</table>
</body>
Expand Down
98 changes: 45 additions & 53 deletions src/utils/templates/inviteUserTemplate.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,48 @@
export default function Template(orgName: string, link: string) {
return /* html */ `
<table style="font-size: 16px; font-family: 'Rubik'; text-align: left">
<tbody>
<tr>
<td>
<p style="margin-bottom: 20px">Hello,</p>
<br />
<p style="margin-bottom: 5px">
You have been invited to join a Pulse organization called
<strong>${orgName}</strong>.
</p>
<p style="margin-bottom: 10px">
The link below will take you to the registration page where you can create
an account.
</p>
<a href="${link}" style="text-decoration: none; cursor: pointer">
<button
style="
font-size: 16px;
background-color: rgb(134, 103, 242);
font-family: 'Rubik';
text-align: center;
border: none;
border-radius: 3px;
padding: 5px;
cursor: pointer;
color: whitesmoke;
"
>
Join ${orgName}
</button>
</a>
<br />
<p>If the button is not functional, copy and paste the link below: </p>
${link}
<br />
<br />
<p>
If you did not initiate the request or you think this email reached your
inbox by mistake, simply ignore it.
</p>
<br />
<br />
<p>Best Regard,</p>
<p>Pulse team</p>
</td>
</tr>
</tbody>
</table>
return `
<div style="font-size: 16px; font-family: 'Rubik'; margin-top: 0px; text-align: left; color: black">
<div style="margin-top: 0px; color: black">
<p><strong>From:</strong> [email protected]</p>
<p><strong>Subject:</strong> Invitation</p>
<p><strong>Invitation</strong></p> <br/>
</div>
<img src="${process.env.FRONTEND_LINK}/images/logo.png" />
<br/><br/><br/>
<p>Hello,</p> <br/>
<p>You have been invited to join a Pulse organization called <strong>${orgName}</strong>.</p>
<p>The link below will take you to the registration page where you can create an account.</p>
<a href="${link}" style="text-decoration: none; cursor: pointer">
<button style="
font-size: 16px;
background-color: #d3d3d3;
font-family: 'Rubik';
text-align: center;
border: none;
border-radius: 3px;
padding: 5px;
cursor: pointer;
color: #800080;
text-decoration: underline;
">
Join ${orgName}
</button>
</a>
<br />
<br />
<p>If you did not initiate the request or you think this email reached your inbox by mistake, simply ignore it.</p>
<br />
<br />
<p><strong>Best Regards,</strong></p>
<p>Pulse team</p>
</div>
`
}

0 comments on commit 2e53fb4

Please sign in to comment.