refactor: simplify email template and adjust theme #131

This commit is contained in:
sovejero 2023-07-13 13:48:25 -03:00 committed by GitHub
parent 6fde14a92c
commit a5807efb75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 155 additions and 574 deletions

View file

@ -1,32 +1,15 @@
{% extends "email/default.html" %}
{% block title %}Remove Two-Factor Authentication{% endblock %}</h1>
{% block preheader %}Remove Two-Factor Authentication.{% endblock %}
{% block title %}Remove Two-Factor Authentication{% endblock %}
{% block content %}
<p>We received a request to remove two-factor authentication from your account. In 72 hours, click the link below.</p>
<p>If you didn't make this request, change your password and use the Log Out Everywhere feature in your <a href="/settings/security">Security Settings</a> to permanently invalidate the link.</p>
<div class="overflow-x-auto"><table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<div class="overflow-x-auto><table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
<tr>
<td align="center">
<a href="{{action_url}}" class="f-fallback button" target="_blank">Remove 2FA</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<div class="overflow-x-auto"><table class="body-sub" role="presentation">
<tr>
<td>
<p class="f-fallback sub">If youre having trouble with the button above, copy and paste the URL below into your web browser.</p>
<p class="f-fallback sub">{{action_url}}</p>
</td>
</tr>
</table>
<div class="button-container">
<a href="{{action_url}}" class="button" target="_blank" rel="noopener">Remove 2FA</a>
</div>
<p class="user-info">Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<hr />
<p class="raw-link">If the button doesn't work, you can copy and paste this link into your browser: <br>{{action_url}}</p>
{% endblock %}

View file

@ -1,410 +1,112 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="x-apple-disable-message-reformatting" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css" rel="stylesheet" media="all">
html {
font-size: 14px;
}
body {
width: 100% !important;
height: 100%;
margin: 0;
-webkit-text-size-adjust: none;
}
a {
color: #FF66AC!important;
}
a img {
border: none;
}
td {
word-break: break-word;
}
.preheader {
display: none !important;
visibility: hidden;
mso-hide: all;
font-size: 1px;
line-height: 1px;
max-height: 0;
max-width: 0;
opacity: 0;
overflow: hidden;
}
body,
td,
th {
font-family: Helvetica, Arial, sans-serif;
}
h1 {
margin-top: 0;
color: #121213;
font-size: 22px;
font-weight: bold;
text-align: left;
}
h2 {
margin-top: 0;
color: #121213;
font-size: 1rem;
font-weight: bold;
text-align: left;
}
h3 {
margin-top: 0;
color: #121213;
font-size: 14px;
font-weight: bold;
text-align: left;
}
td,
th {
font-size: 1rem;
}
p,
ul,
ol,
blockquote {
margin: .4em 0 1.1875em;
font-size: 1rem;
line-height: 1.625;
}
p.sub {
font-size: 13px;
}
.align-right {
text-align: right;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.button {
background-color: #FF66AC;
border-top: 10px solid #FF66AC;
border-right: 18px solid #FF66AC;
border-bottom: 10px solid #FF66AC;
border-left: 18px solid #FF66AC;
display: inline-block;
color: #FFF!important;
text-decoration: none;
border-radius: .25rem;
-webkit-text-size-adjust: none;
box-sizing: border-box;
}
.button--green {
background-color: #23CE6B;
border-top: 10px solid #23CE6B;
border-right: 18px solid #23CE6B;
border-bottom: 10px solid #23CE6B;
border-left: 18px solid #23CE6B;
}
.button--red {
background-color: #F05D5E;
border-top: 10px solid #F05D5E;
border-right: 18px solid #F05D5E;
border-bottom: 10px solid #F05D5E;
border-left: 18px solid #F05D5E;
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
text-align: center !important;
}
}
.attributes {
margin: 0 0 21px;
}
.attributes_content {
background-color: #EDF2F7;
padding: 1rem;
border-radius: 0.35rem;
}
.attributes_item {
padding: 0;
}
.related {
width: 100%;
margin: 0;
padding: 25px 0 0 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.related_item {
padding: 10px 0;
color: #CBCCCF;
font-size: 15px;
line-height: 18px;
}
.related_item-title {
display: block;
margin: .5em 0 0;
}
.related_item-thumb {
display: block;
padding-bottom: 10px;
}
.related_heading {
border-top: 1px solid #CBCCCF;
text-align: center;
padding: 25px 0 10px;
}
.discount {
width: 100%;
margin: 0;
padding: 24px;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #EDF2F7;
border: 2px dashed #CBCCCF;
}
.discount_heading {
text-align: center;
}
.discount_body {
text-align: center;
font-size: 15px;
}
.social {
width: auto;
}
.social td {
padding: 0;
width: auto;
}
.social_icon {
height: 20px;
margin: 0 8px 10px 8px;
padding: 0;
}
.purchase {
width: 100%;
margin: 0;
padding: 35px 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_content {
width: 100%;
margin: 0;
padding: 25px 0 0 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.purchase_item {
padding: 10px 0;
color: #121213;
font-size: 15px;
line-height: 18px;
}
.purchase_heading {
padding-bottom: 8px;
border-bottom: 1px solid #E6E6E6;
}
.purchase_heading p {
margin: 0;
color: #85878E;
font-size: 12px;
}
.purchase_footer {
padding-top: 15px;
border-top: 1px solid #E6E6E6;
}
.purchase_total {
margin: 0;
text-align: right;
font-weight: bold;
color: #121213;
}
.purchase_total--label {
padding: 0 15px 0 0;
}
body {
background-color: #EDF2F7;
color: #121213;
}
p {
color: #121213;
}
p.sub {
color: #6B6E76;
}
.email-wrapper {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #EDF2F7;
}
.email-content {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
}
.email-masthead {
display: none;
}
.email-masthead_logo {
width: 94px;
}
.email-masthead_name {
font-size: 1.25rem;
font-weight: bold;
color: #121213;
text-decoration: none;
}
.email-body {
width: 100%;
margin: 0;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #cfcfcf;
}
.email-body_inner {
width: 570px;
margin: 0 auto;
padding: 0;
-premailer-width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
background-color: #cfcfcf;
}
.email-footer {
width: 570px;
margin: 0 auto;
padding: 0;
-premailer-width: 570px;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
text-align: center;
}
.email-footer p {
color: #6B6E76;
}
.body-action {
width: 100%;
margin: 30px auto;
padding: 0;
-premailer-width: 100%;
-premailer-cellpadding: 0;
-premailer-cellspacing: 0;
text-align: center;
}
.body-sub {
margin-top: 25px;
padding-top: 25px;
border-top: 1px solid #E6E6E6;
}
.content-cell {
padding: 35px;
}
@media only screen and (max-width: 600px) {
.email-body_inner,
.email-footer {
width: 100% !important;
}
}
@media (prefers-color-scheme: dark) {
body,
.email-body,
.email-body_inner,
.email-content,
.email-wrapper,
.email-masthead,
.email-footer {
background-color: #121213 !important;
color: #FFF !important;
}
p,
ul,
ol,
blockquote,
h1,
h2,
h3 {
color: #FFF !important;
}
.attributes_content,
.discount {
background-color: #222 !important;
}
.email-masthead_name {
text-shadow: none !important;
}
}
</style>
</head>
<body>
<span class="preheader">{% block preheader %}Thanks for joining {{SITE_TITLE}}! Please take a sec to verify the email you used to sign up.{% endblock %}</span>
<div class="overflow-x-auto"><table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<div class="overflow-x-auto"><table class="email-content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="email-masthead">
<a href="/" class="f-fallback email-masthead_name">
{{SITE_TITLE}}
</a>
</td>
</tr>
<tr>
<td class="email-body" width="100%" cellpadding="0" cellspacing="0">
<div class="overflow-x-auto"><table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="content-cell">
<div class="f-fallback">
<h1>{% block title %}Title Goes Here{% endblock %}</h1>
{% block content %}
{% for entry in data %}
<h3>{{entry[0]}}</h3>
<p>{{entry[1]}}</p>
{% endfor %}
{% endblock %}
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css" rel="stylesheet" media="all">
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #ffffff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333333;
}
p {
margin-bottom: 10px;
color: #333333;
line-height: 1.25rem;
}
.button-container {
text-align: center;
margin-top: 30px;
margin-bottom: 40px;
}
.button {
display: inline-block;
background-color: #1a6187;
color: #ffffff;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
}
.raw-link {
display: block;
margin-top: 10px;
font-size: 14px;
text-align: left;
color: #777777;
word-wrap: break-word;
}
.reference-text {
margin-top: 20px;
font-size: 14px;
line-height: 1rem;
}
.user-info {
font-size: 14px;
color: #333333;
}
.user-info p {
margin-left: 20px;
line-height: 1rem;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #222222;
color: #ffffff;
}
h1 {
color: #ffffff;
}
p {
color: #cccccc;
}
.container {
background-color: #1d323d;
}
.button {
background-color: #2280B3;
}
.raw-link {
color: #cccccc;
}
.reference-text {
color: #cccccc;
}
.user-info {
color: #cccccc;
}
}
@media screen and (max-width: 600px) {
.container {
padding: 10px;
}
h1 {
font-size: 24px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>{% block title %}{% endblock %}</h1>
{% block content %}
{% endblock %}
</div>
</body>
</html>

View file

@ -1,54 +1,18 @@
{% extends "email/default.html" %}
{% block title %}Verify Your Email{% endblock %}</h1>
{% block preheader %}Verify your new {{SITE_TITLE}} email.{% endblock %}
{% block title %}Verify your new {{SITE_TITLE}} email.{% endblock %}</h1>
{% block content %}
<p>You told us you wanted to change your {{SITE_TITLE}} account email. To finish this process, please verify your new email address:</p>
<div class="overflow-x-auto"><table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<div class="overflow-x-auto><table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
<tr>
<td align="center">
<a href="{{action_url}}" class="f-fallback button" target="_blank">Verify email</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>For reference, here's your current information:</p>
<div class="overflow-x-auto"><table class="attributes" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_content">
<div class="overflow-x-auto><table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Email:</strong> {{v.email}}
</span>
</td>
</tr>
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Username:</strong> {{v.username}}
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<div class="overflow-x-auto"><table class="body-sub" role="presentation">
<tr>
<td>
<p class="f-fallback sub">If youre having trouble with the button above, copy and paste the URL below into your web browser.</p>
<p class="f-fallback sub">{{action_url}}</p>
</td>
</tr>
</table>
<p>You told us you wanted to change your {{SITE_TITLE}} account email. To finish this process, please verify your new email address:</p>
<div class="button-container">
<a href="{{action_url}}" class="button" target="_blank" rel="noopener">Verify Email</a>
</div>
<p class="reference-text">For reference, here's your current information:</p>
<div class="user-info">
<p><strong>Username:</strong> {{v.username}}</p>
<p><strong>Email:</strong> {{v.email}}</p>
</div>
<p class="user-info">Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<hr />
<p class="raw-link">If the button doesn't work, you can copy and paste this link into your browser: <br>{{action_url}}</p>
{% endblock %}

View file

@ -1,52 +1,18 @@
{% extends "email/default.html" %}
{% block title %}Welcome to {{SITE_TITLE}}!{% endblock %}</h1>
{% block title %}Welcome to {{SITE_TITLE}}!{% endblock %}
{% block content %}
<p>Thanks for joining {{SITE_TITLE}}. Were happy to have you on board. To get the most out of {{SITE_TITLE}}, please verify your account email:</p>
<div class="overflow-x-auto"><table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<div class="overflow-x-auto><table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
<tr>
<td align="center">
<a href="{{action_url}}" class="f-fallback button" target="_blank">Verify email</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>For reference, here's your username.</p>
<div class="overflow-x-auto"><table class="attributes" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_content">
<div class="overflow-x-auto><table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Email:</strong> {{v.email}}
</span>
</td>
</tr>
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Username:</strong> {{v.username}}
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<div class="overflow-x-auto"><table class="body-sub" role="presentation">
<tr>
<td>
<p class="f-fallback sub">If youre having trouble with the button above, copy and paste the URL below into your web browser.</p>
<p class="f-fallback sub">{{action_url}}</p>
</td>
</tr>
</table>
<p>Thanks for joining {{SITE_TITLE}}. Were happy to have you on board. Please click the button below to verify your email address:</p>
<div class="button-container">
<a href="{{action_url}}" class="button" target="_blank" rel="noopener">Verify Email</a>
</div>
<p class="reference-text">For reference, here's your username:</p>
<div class="user-info">
<p><strong>Username:</strong> {{v.username}}</p>
<p><strong>Email:</strong> {{v.email}}</p>
</div>
<p class="user-info">Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<hr />
<p class="raw-link">If the button doesn't work, you can copy and paste this link into your browser: <br>{{action_url}}</p>
{% endblock %}

View file

@ -1,52 +1,18 @@
{% extends "email/default.html" %}
{% block title %}Reset Your Password{% endblock %}
{% block preheader %}Reset your {{SITE_TITLE}} password.{% endblock %}
{% block title %}Reset your {{SITE_TITLE}} password.{% endblock %}
{% block content %}
<p>To reset your password, click the button below:</p>
<div class="overflow-x-auto"><table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<div class="overflow-x-auto><table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
<tr>
<td align="center">
<a href="{{action_url}}" class="f-fallback button" target="_blank">Reset password</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>For reference, here's your login information:</p>
<div class="overflow-x-auto"><table class="attributes" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_content">
<div class="overflow-x-auto><table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Email:</strong> {{v.email}}
</span>
</td>
</tr>
<tr>
<td class="attributes_item">
<span class="f-fallback">
<strong>Username:</strong> {{v.username}}
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="overflow-x-auto"><table class="body-sub" role="presentation">
<tr>
<td>
<p class="f-fallback sub">If youre having trouble with the button above, copy and paste the URL below into your web browser.</p>
<p class="f-fallback sub">{{action_url}}</p>
</td>
</tr>
</table>
<p>To reset your password, click the button below:</p>
<div class="button-container">
<a href="{{action_url}}" class="button" target="_blank" rel="noopener">Reset password</a>
</div>
<p class="reference-text">For reference, here's your login information:</p>
<div class="user-info">
<p><strong>Username:</strong> {{v.username}}</p>
<p><strong>Email:</strong> {{v.email}}</p>
</div>
<p class="user-info">Please note that {{SITE_TITLE}} will never ask you for your email, password, or two-factor token via email, text, or phone.</p>
<hr />
<p class="raw-link">If the button doesn't work, you can copy and paste this link into your browser: <br>{{action_url}}</p>
{% endblock %}