Open platform to collect and prioritize feedback
Better email formatting.
Matt Roberts610dbf0ccdcd
diff --git a/views/email/base_email.html b/views/email/base_email.htmlindex 7ca73e3e3..1952ff226 100644--- a/views/email/base_email.html+++ b/views/email/base_email.html@@ -13,12 +13,13 @@ body:margin: 10px;border-radius: 5px;color: #1c262d;- border: 1px solid #ECECEC;+ border: 1px solid #E0E0E0;min-width: 320px;max-width: 660px;overflow-wrap: break-word;word-break: break-word;table-layout: fixed;+ box-shadow: 0 2px 8px rgba(0,0,0,0.08);pre:has(code) {white-space: break-spaces;@@ -43,14 +44,17 @@ body:{{ end }}<tr><td align="center">- <table class="user-content" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" border="0">+ <table class="user-content" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" border="0" style="text-align:left;padding:20px;margin:10px;border-radius:5px;color:#1c262d;border:1px solid #E0E0E0;min-width:320px;max-width:660px;overflow-wrap:break-word;word-break:break-word;box-shadow:0 2px 8px rgba(0,0,0,0.08);">{{block "body" .}}{{end}}</table></td></tr>{{ if .noreply }}<tr>- <td>+ <td height="20"> </td>+ </tr>+ <tr>+ <td style="padding:0 20px;"><span style="color:#666;font-size:12px">{{ "email.footer.noreply" | translate }}</span></td></tr>diff --git a/views/email/change_emailaddress_email.html b/views/email/change_emailaddress_email.htmlindex 0f86ca80e..13651428b 100644--- a/views/email/change_emailaddress_email.html+++ b/views/email/change_emailaddress_email.html@@ -2,11 +2,11 @@{{define "body"}}<tr>- <td>- <h2 style="color:#1c262d">{{ translate "email.greetings_name" (dict "name" .name) }}</h2>- <p style="color:#1c262d">{{ translate "email.change_emailaddress.request" (dict "oldEmail" .oldEmail "newEmail" .newEmail) }}</p>- <p style="color:#1c262d">{{ "email.operation_confirmation" | translate }}</p>- <p>{{ .link | html }}</p>+ <td style="padding:20px 30px 30px 30px;">+ <h2 style="color:#1c262d;margin:0 0 15px 0;padding:0;">{{ translate "email.greetings_name" (dict "name" .name) }}</h2>+ <p style="color:#1c262d;margin:0 0 10px 0;">{{ translate "email.change_emailaddress.request" (dict "oldEmail" .oldEmail "newEmail" .newEmail) }}</p>+ <p style="color:#1c262d;margin:0 0 20px 0;">{{ "email.operation_confirmation" | translate }}</p>+ <p style="margin:0;">{{ .link | html }}</p></td></tr>{{end}}\ No newline at end of filediff --git a/views/email/change_status.html b/views/email/change_status.htmlindex 391dfb946..55af6755d 100644--- a/views/email/change_status.html+++ b/views/email/change_status.html@@ -2,19 +2,25 @@{{define "body"}}<tr>- <td>- <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d">+ <td style="padding:20px 30px 30px 30px;">+ <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d;margin:0 0 15px 0;">{{ if .duplicate }}{{ translate "email.change_status.duplicate" (dict "title" (.title | stripHtml) "postLink" .postLink "duplicate" .duplicate) | html }}{{ else }}{{ translate "email.change_status.others" (dict "title" (.title | stripHtml) "postLink" .postLink "status" (.status | lower)) | html }}{{ end }}</p>- {{ .content }}- <p style="color:#666;font-size:14px">- — <br />- {{ translate "email.footer.subscription_notice" (dict "view" .view "unsubscribe" .unsubscribe "change" .change) | html }}- </p>+ <div style="margin:0;">+ {{ .content }}+ </div>+ <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">+ <tr>+ <td style="color:#666;font-size:14px;padding:0;">+ —<br /><br />+ {{ translate "email.footer.subscription_notice" (dict "view" .view "unsubscribe" .unsubscribe "change" .change) | html }}+ </td>+ </tr>+ </table></td></tr>{{end}}diff --git a/views/email/delete_post.html b/views/email/delete_post.htmlindex eef038826..0e7c316fe 100644--- a/views/email/delete_post.html+++ b/views/email/delete_post.html@@ -2,15 +2,21 @@{{define "body"}}<tr>- <td>- <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d">+ <td style="padding:20px 30px 30px 30px;">+ <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d;margin:0 0 15px 0;">{{ translate "email.delete_post.text" (dict "title" (.title | stripHtml)) | html }}</p>- {{ .content }}- <p style="color:#666;font-size:14px">- — <br />- {{ translate "email.footer.subscription_notice2" (dict "change" .change) | html }}- </p>+ <div style="margin:0;">+ {{ .content }}+ </div>+ <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">+ <tr>+ <td style="color:#666;font-size:14px;padding:0;">+ —<br /><br />+ {{ translate "email.footer.subscription_notice2" (dict "change" .change) | html }}+ </td>+ </tr>+ </table></td></tr>{{end}}\ No newline at end of filediff --git a/views/email/invite_email.html b/views/email/invite_email.htmlindex 63e33ccf0..433723783 100644--- a/views/email/invite_email.html+++ b/views/email/invite_email.html@@ -2,6 +2,6 @@{{define "body"}}<tr>- <td>{{ .message }}</td>+ <td style="padding:20px 30px 30px 30px;">{{ .message }}</td></tr>{{end}}\ No newline at end of filediff --git a/views/email/new_comment.html b/views/email/new_comment.htmlindex d82959c40..1c2aba39d 100644--- a/views/email/new_comment.html+++ b/views/email/new_comment.html@@ -2,15 +2,21 @@{{define "body"}}<tr>- <td>- <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d">+ <td style="padding:20px 30px 30px 30px;">+ <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d;margin:0 0 15px 0;">{{ translate .messageLocaleString (dict "userName" .userName "title" (.title | stripHtml) "postLink" .postLink) | html }}</p>- {{ .content }}- <p style="color:#666;font-size:14px">- — <br />- {{ translate "email.footer.subscription_notice" (dict "view" .view "unsubscribe" .unsubscribe "change" .change) | html }}- </p>+ <div style="margin:0;">+ {{ .content }}+ </div>+ <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">+ <tr>+ <td style="color:#666;font-size:14px;padding:0;">+ —<br /><br />+ {{ translate "email.footer.subscription_notice" (dict "view" .view "unsubscribe" .unsubscribe "change" .change) | html }}+ </td>+ </tr>+ </table></td></tr>{{end}}\ No newline at end of filediff --git a/views/email/new_post.html b/views/email/new_post.htmlindex 788609030..0bca9edb8 100644--- a/views/email/new_post.html+++ b/views/email/new_post.html@@ -2,15 +2,21 @@{{define "body"}}<tr>- <td>- <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d">+ <td style="padding:20px 30px 30px 30px;">+ <p style="padding-bottom:10px;border-bottom:1px solid #efefef;color:#1c262d;margin:0 0 15px 0;">{{ translate "email.new_post.text" (dict "userName" (.userName | stripHtml) "title" (.title | stripHtml) "postLink" .postLink) | html }}</p>- {{ .content }}- <p style="color:#666;font-size:14px">- — <br />- {{ translate "email.footer.subscription_notice3" (dict "view" .view "change" .change) | html }}- </p>+ <div style="margin:0;">+ {{ .content }}+ </div>+ <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">+ <tr>+ <td style="color:#666;font-size:14px;padding:0;">+ —<br /><br />+ {{ translate "email.footer.subscription_notice3" (dict "view" .view "change" .change) | html }}+ </td>+ </tr>+ </table></td></tr>{{end}}\ No newline at end of filediff --git a/views/email/signin_email.html b/views/email/signin_email.htmlindex 45af3795d..e884daf0e 100644--- a/views/email/signin_email.html+++ b/views/email/signin_email.html@@ -2,20 +2,27 @@{{define "body"}}<tr>- <td>- <h2 style="color:#1c262d">{{ "email.greetings" | translate }}</h2>- <p style="color:#1c262d">{{ "email.signin_email.text" | translate }}</p>- <p style="color:#1c262d">{{ translate "email.signin_email.confirmation" (dict "siteName" (.siteName | stripHtml)) | html }}</p>+ <td style="padding:20px 30px 30px 30px;">+ <h2 style="color:#1c262d;margin:0 0 15px 0;padding:0;">{{ "email.greetings" | translate }}</h2>+ <p style="color:#1c262d;margin:0 0 10px 0;">{{ "email.signin_email.text" | translate }}</p>+ <p style="color:#1c262d;margin:0 0 20px 0;">{{ translate "email.signin_email.confirmation" (dict "siteName" (.siteName | stripHtml)) | html }}</p>- <div style="margin: 30px 0; text-align: center;">- <p style="color:#1c262d; font-size: 14px; margin-bottom: 10px;"><strong>{{ "email.signin_email.your_code" | translate }}</strong></p>- <div style="background: #f5f7f9; border: 2px solid #dfe3e8; border-radius: 8px; padding: 20px; display: inline-block;">- <p style="font-size: 36px; font-weight: bold; letter-spacing: 8px; color: #1c262d; margin: 0; font-family: 'Courier New', monospace;">{{ .code }}</p>- </div>- <p style="color:#6c757d; font-size: 12px; margin-top: 10px;">{{ "email.signin_email.code_expires" | translate }}</p>- </div>+ <table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:20px 0;">+ <tr>+ <td align="center" style="padding:0;">+ <p style="color:#1c262d; font-size: 14px; margin:0 0 10px 0;"><strong>{{ "email.signin_email.your_code" | translate }}</strong></p>+ <div style="background: #f5f7f9; border: 2px solid #dfe3e8; border-radius: 8px; padding: 20px; display: inline-block;">+ <p style="font-size: 36px; font-weight: bold; letter-spacing: 8px; color: #1c262d; margin: 0; font-family: 'Courier New', monospace;">{{ .code }}</p>+ </div>+ <p style="color:#6c757d; font-size: 12px; margin:10px 0 0 0;">{{ "email.signin_email.code_expires" | translate }}</p>+ </td>+ </tr>+ </table>- <p style="color:#6c757d; font-size: 12px;">{{ "email.signin_email.alternative" | translate }}<br>{{ .link | html }}</p>+ <p style="color:#6c757d; font-size: 12px; margin:20px 0 0 0;">+ {{ "email.signin_email.alternative" | translate }}<br /><br />+ {{ .link | html }}+ </p></td></tr>{{end}}\ No newline at end of filediff --git a/views/email/signup_email.html b/views/email/signup_email.htmlindex 12856883d..77384eca1 100644--- a/views/email/signup_email.html+++ b/views/email/signup_email.html@@ -2,11 +2,11 @@{{define "body"}}<tr>- <td>- <h2 style="color:#1c262d">{{ "email.greetings" | translate }}</h2>- <p style="color:#1c262d">{{ "email.signup_email.text" | translate }}</p>- <p style="color:#1c262d">{{ "email.signup_email.confirmation" | translate }}</p>- <p>{{ .link | html }}</p>+ <td style="padding:20px 30px 30px 30px;">+ <h2 style="color:#1c262d;margin:0 0 15px 0;padding:0;">{{ "email.greetings" | translate }}</h2>+ <p style="color:#1c262d;margin:0 0 10px 0;">{{ "email.signup_email.text" | translate }}</p>+ <p style="color:#1c262d;margin:0 0 20px 0;">{{ "email.signup_email.confirmation" | translate }}</p>+ <p style="margin:0;">{{ .link | html }}</p></td></tr>{{end}}\ No newline at end of file