8000 Feat update mail template by eldadfux · Pull Request #1225 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feat update mail template #1225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 17 additions & 45 deletions app/config/locale/templates/email-base.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

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;
.container {
padding: 0;
width: 100%;
}

table[class=body] .btn a {
width: 100% !important;
.btn-primary a {
font-size: 13px;
}
}

Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
10 changes: 4 additions & 6 deletions app/config/locale/templates/email-cta.tpl
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -18,9 +18,7 @@
</tbody>
</table>
<p>
<small>
<a href="{{redirect}}" target="_blank">
{{redirect}}
</a>
</small>
<a href="{{redirect}}" target="_blank">
{{redirect}}
</a>
</p>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>
<p>
Hola {{name}},
</p>
<p>
Expand All @@ -12,4 +12,4 @@
Gracias,
<br />
Equipo {{project}}
</p>
</p>
Original file line number Diff line number Diff line change
@@ -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}}.
Expand Down
6D40
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
שלום {{name}},
</p>
<p>
נא ללחוץ על הקישור שלהלן כדי לאמת את החשבון שלך.
אנא לחץ\י על הקישור שלהלן כדי לאמת את החשבון שלך.
</p>
{{cta}}
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
הודעת דוא״ל זו נשלחה אליך כי <b>{{owner}}</b> ביקש להזמינך להצטרף לצוות <b>{{team}}</b> ב־{{project}}.
</p>
<p>
כדי להצטרף לצוות <b>{{team}}</b>, נא ללחוץ על הקישור:
כדי להצטרף לצוות <b>{{team}}</b>, אנא לחץ\י על הקישור:
</p>
{{cta}}
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
שלום {{name}},
</p>
<p>
נא ללחוץ על הקישור שלהלן כדי לאפס את הסיסמה שלך ב־{{project}}.
אנא לחץ\י על הקישור שלהלן כדי לאפס את הסיסמה שלך ב־{{project}}.
</p>
{{cta}}
<p>
Expand Down
14 changes: 6 additions & 8 deletions app/controllers/api/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -1462,17 +1462,16 @@
$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')
;
Expand Down Expand Up @@ -1665,17 +1664,16 @@
$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')
;
Expand Down
7 changes: 3 additions & 4 deletions app/controllers/api/teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,17 @@
$title = \sprintf($locale- 768C >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'))
->setParam('{{project}}', $project->getAttribute('name', ['[APP-NAME]']))
->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')
;
Expand Down
0