feat: markdown in email body for mailing and transactional
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
<html lang="und" dir="auto" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
|
||||
<head>
|
||||
<title>MyE&P Team</title>
|
||||
@@ -116,7 +116,16 @@
|
||||
font-size: 20px;
|
||||
line-height: 24px;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
/* Was 0 while an h2 only ever preceded a p, which brings its own spacing. */
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-weight: bold;
|
||||
font-size: 17px;
|
||||
line-height: 22px;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
p {
|
||||
@@ -152,12 +161,28 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
/* Margin, not padding: Outlook on Windows renders list padding unreliably. */
|
||||
margin: 0 0 16px 24px;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
li {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="word-spacing:normal;background-color:#666666;">
|
||||
<div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">MyE&P Team</div>
|
||||
<div style="background-color:#666666;">
|
||||
<div aria-label="MyE&P Team" aria-roledescription="email" style="background-color:#666666;" role="article" lang="und" dir="auto">
|
||||
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0;font-size:0;mso-line-height-rule:exactly;"><v:image style="border:0;mso-position-horizontal:center;position:absolute;top:0;width:600px;z-index:-3;" xmlns:v="urn:schemas-microsoft-com:vml" /><![endif]-->
|
||||
<div style="margin:0 auto;max-width:600px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
@@ -215,16 +240,22 @@
|
||||
<div style="font-family:Lato, Verdana, Arial, 'Helvetica neue', sans-serif;font-size:16px;line-height:24px;text-align:left;color:#666666;">{% block body %} <h1> Lorem ipsum dolor sit amet </h1>
|
||||
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto culpa delectus dolores earum eius fugiat in nesciunt quas quidem vitae? </p>
|
||||
<h2> Lorem ipsum dolor </h2>
|
||||
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto culpa delectus dolores <strong>earum eius fugiat in nesciunt quas quidem vitae</strong>? </p>
|
||||
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto culpa delectus dolores <strong>earum eius fugiat in nesciunt quas quidem vitae</strong>, <em>eius fugiat</em>? </p>
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor</li>
|
||||
<li>Consectetur adipisicing elit</li>
|
||||
</ul>
|
||||
<h3> Lorem ipsum </h3>
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor</li>
|
||||
<li>Consectetur adipisicing elit</li>
|
||||
</ol>
|
||||
<p>
|
||||
<a href="#" class="button"> Button </a>
|
||||
</p>
|
||||
<p class="small"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, eveniet! </p> {% endblock %}
|
||||
{% block button %}
|
||||
<p>
|
||||
<a href="{{ url('app_index') }}" class="button">Zum Portal</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
<p class="small"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus, eveniet! </p> {% endblock %} {% block button %} <p>
|
||||
<a href="{{ url('app_index') }}" class="button">Zum Portal</a>
|
||||
</p> {% endblock %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{% extends 'email/layout.html.twig' %}
|
||||
|
||||
{# Everything on `bodyHtml` was escaped by App\Email\MailBodyRenderer before any tag was
|
||||
introduced, which is what makes |raw safe here - same contract as email/generic.html.twig.
|
||||
Do not pass anything into this template that did not come out of that renderer. #}
|
||||
{% block body %}
|
||||
<p>
|
||||
{{ message | nl2br }}
|
||||
</p>
|
||||
{{ bodyHtml | raw }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user