Merge pull request #1225 from appwrite/feat-update-mail-template

Feat update mail template
This commit is contained in:
Eldad A. Fux 2021-05-31 14:34:40 +03:00 committed by GitHub
commit 36793d0ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 69 deletions

View file

@ -56,13 +56,13 @@
.main {
background: {{bg-content}};
border-radius: 3px;
border-radius: 10px;
width: 100%;
}
.wrapper {
box-sizing: border-box;
padding: 20px;
padding: 30px 30px 15px 30px;
}
.content-block {
@ -97,16 +97,15 @@
.btn table td {
background-color: {{bg-content}};
border-radius: 5px;
border-radius: 20px;
text-align: center;
}
.btn a {
background-color: {{bg-content}};
border: solid 1px {{bg-cta}};
border-radius: 5px;
border-radius: 20px;
box-sizing: border-box;
color: #3498db;
color: #577590;
cursor: pointer;
display: inline-block;
font-size: 14px;
@ -123,45 +122,17 @@
.btn-primary a {
background-color: {{bg-cta}};
border-color: {{bg-cta}};
color: {{text-cta}};
}
@media only screen and (max-width: 620px) {
table[class=body] h1 {
font-size: 28px !important;
margin-bottom: 10px !important;
.container {
padding: 0;
width: 100%;
}
table[class=body] p {
font-size: 16px !important;
}
table[class=body] .wrapper {
padding: 10px !important;
}
table[class=body] .content {
padding: 0 !important;
}
table[class=body] .container {
padding: 0 !important;
width: 100% !important;
}
table[class=body] .main {
border-left-width: 0 !important;
border-radius: 0 !important;
border-right-width: 0 !important;
}
table[class=body] .btn table {
width: 100% !important;
}
table[class=body] .btn a {
width: 100% !important;
.btn-primary a {
font-size: 13px;
}
}
@ -198,12 +169,11 @@
}
.btn-primary table td:hover {
background-color: {{bg-cta-hover}} !important;
opacity: 0.7 !important;
}
.btn-primary a:hover {
background-color: {{bg-cta-hover}} !important;
border-color: {{bg-cta-hover}} !important;
opacity: 0.7 !important;
}
}
</style>
@ -220,15 +190,17 @@
<td class="wrapper">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
{{content}}
</td>
<td>{{content}}</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- <div style="text-align: center; line-height: 25px; margin: 15px 0; font-size: 12px; color: #40404c;">
<a href="https://appwrite.io" style="text-decoration: none; color: #40404c;">Powered by <img src="https://appwrite.io/images/appwrite-footer-light.svg" height="15" style="margin: -3px 0" /></a>
</div> -->
</td>
<td>&nbsp;</td>
</tr>

View file

@ -1,7 +1,7 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody>
<tr>
<td align="left">
<td>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
@ -18,9 +18,7 @@
</tbody>
</table>
<p>
<small>
<a href="{{redirect}}" target="_blank">
{{redirect}}
</a>
</small>
<a href="{{redirect}}" target="_blank">
{{redirect}}
</a>
</p>

View file

@ -1,4 +1,4 @@
<p>
<p>
Hola {{name}},
</p>
<p>
@ -12,4 +12,4 @@
Gracias,
<br />
Equipo {{project}}
</p>
</p>

View file

@ -1,5 +1,5 @@
<p>
Hola,
Hola {{name}},
</p>
<p>
Te hemos enviado este correo porque <b>{{owner}}</b> quiere invitarte a formar parte del equipo <b>{{team}}</b> en {{project}}.

View file

@ -2,7 +2,7 @@
שלום {{name}},
</p>
<p>
נא ללחוץ על הקישור שלהלן כדי לאמת את החשבון שלך.
אנא לחץ\י על הקישור שלהלן כדי לאמת את החשבון שלך.
</p>
{{cta}}
<p>

View file

@ -5,7 +5,7 @@
הודעת דוא״ל זו נשלחה אליך כי <b>{{owner}}</b> ביקש להזמינך להצטרף לצוות <b>{{team}}</b> ב־{{project}}.
</p>
<p>
כדי להצטרף לצוות <b>{{team}}</b>, נא ללחוץ על הקישור:
כדי להצטרף לצוות <b>{{team}}</b>, אנא לחץ\י על הקישור:
</p>
{{cta}}
<p>

View file

@ -2,7 +2,7 @@
שלום {{name}},
</p>
<p>
נא ללחוץ על הקישור שלהלן כדי לאפס את הסיסמה שלך ב־{{project}}.
אנא לחץ\י על הקישור שלהלן כדי לאפס את הסיסמה שלך ב־{{project}}.
</p>
{{cta}}
<p>

View file

@ -1462,17 +1462,16 @@ App::post('/v1/account/recovery')
$cta = new Template(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$body
->setParam('{{content}}', $content->render())
->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.recovery.title'))
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->setParam('{{name}}', $profile->getAttribute('name'))
->setParam('{{redirect}}', $url)
->setParam('{{bg-body}}', '#f6f6f6')
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{bg-cta}}', '#3498db')
->setParam('{{bg-cta-hover}}', '#34495e')
->setParam('{{bg-cta}}', '#073b4c')
->setParam('{{text-content}}', '#000000')
->setParam('{{text-cta}}', '#ffffff')
;
@ -1665,17 +1664,16 @@ App::post('/v1/account/verification')
$cta = new Template(__DIR__.'/../../config/locale/templates/email-cta.tpl');
$body
->setParam('{{content}}', $content->render())
->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $locale->getText('account.emails.verification.title'))
->setParam('{{direction}}', $locale->getText('settings.direction'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->setParam('{{name}}', $user->getAttribute('name'))
->setParam('{{redirect}}', $url)
->setParam('{{bg-body}}', '#f6f6f6')
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{bg-cta}}', '#3498db')
->setParam('{{bg-cta-hover}}', '#34495e')
->setParam('{{bg-cta}}', '#073b4c')
->setParam('{{text-content}}', '#000000')
->setParam('{{text-cta}}', '#ffffff')
;

View file

@ -433,7 +433,7 @@ App::post('/v1/teams/:teamId/memberships')
$title = \sprintf($locale->getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]']));
$body
->setParam('{{content}}', $content->render())
->setParam('{{content}}', $content->render(false))
->setParam('{{cta}}', $cta->render())
->setParam('{{title}}', $title)
->setParam('{{direction}}', $locale->getText('settings.direction'))
@ -441,10 +441,9 @@ App::post('/v1/teams/:teamId/memberships')
->setParam('{{team}}', $team->getAttribute('name', '[TEAM-NAME]'))
->setParam('{{owner}}', $user->getAttribute('name', ''))
->setParam('{{redirect}}', $url)
->setParam('{{bg-body}}', '#f6f6f6')
->setParam('{{bg-body}}', '#f7f7f7')
->setParam('{{bg-content}}', '#ffffff')
->setParam('{{bg-cta}}', '#3498db')
->setParam('{{bg-cta-hover}}', '#34495e')
->setParam('{{bg-cta}}', '#073b4c')
->setParam('{{text-content}}', '#000000')
->setParam('{{text-cta}}', '#ffffff')
;