orange_ecom_starter-2.0.x-dev/templates/email/swiftmailer.html.twig
templates/email/swiftmailer.html.twig
{#
/**
* @file
* The default template file for e-mails.
*
* Available variables:
* - subject: The subject.
* - body: The message content.
* - message: The $message array created and used in the mail building
* procedure. Its content varies between cases, but typically contains at
* least the following elements:
* - id: The message identifier.
* - module: The module that handles the building of the message.
* - key: The key of the message.
* - to: The recipient email address.
* - from: The email address of the sender.
* - langcode: The langcode to use to compose the e-mail.
* - params: The message parameters.
*
* This template may be overriden by module and/or mail key, using any of the
* following template names:
* - swiftmailer.html.twig: global, used by default.
* - swiftmailer--mymodule.html.twig: only emails sent by the module "mymodule".
* - swiftmailer--mymodule--test.html.twig: only emails by the module
* "mymodule" with key "test".
*
* @see template_preprocess()
* @see template_preprocess_swiftmailer()
*
* @ingroup themeable
*/
#}
{# Set absolute path for images. #}
{% set image_path = site_path ~ directory ~ '/gfx/email/' %}
{# Set CSS variables. #}
{% if email_wrapper_bg_color %}
{% set wrapper_bg_color = '#' ~ email_wrapper_bg_color %}
{% else %}
{% set wrapper_bg_color = '#f5f5f5' %}
{% endif %}
{% set body_css = 'margin: 0; padding: 0; width: 100%; background-color: ' ~ wrapper_bg_color ~ ';' %}
{% set table_td_css = 'border-collapse: collapse;' %}
<html>
<head>
<style type="text/css">
/* Client-specific Styles. */
#outlook a { padding: 0; } /* Force Outlook to provide a "view in browser" button. */
body { width: 100% !important; }
.ReadMsgBody { width: 100%; }
.ExternalClass { width: 100%; } /* Force Hotmail to display emails at full width. */
body { -webkit-text-size-adjust: none; } /* Prevent Webkit platforms from changing default text sizes. */
img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }
table td {
{{ table_td_css }}
}
body {
{{ body_css }}
}
h1,
.h1 {
display: block;
margin: 0 0 10px 0;
padding: 0;
font-family: Arial, sans-serif;
font-size: 34px;
font-weight: bold;
line-height: 100%;
color: #666666;
text-align: left;
}
h2,
.h2 {
display: block;
margin: 0 0 10px 0;
padding: 0;
font-family: Arial, sans-serif;
font-size: 30px;
font-weight: bold;
line-height: 100%;
color: #666666;
text-align: left;
}
h3,
.h3 {
display: block;
margin: 0 0 10px 0;
padding: 0;
font-family: Arial, sans-serif;
font-size: 26px;
font-weight: bold;
line-height: 100%;
color: #666666;
text-align: left;
}
h3,
.h3 {
display: block;
margin: 0 0 10px 0;
padding: 0;
font-family: Arial, sans-serif;
font-size: 22px;
font-weight: bold;
line-height: 100%;
color: #666666;
text-align: left;
}
.body-content div {
font-family: Arial, sans-serif;
font-size: 18px;
color: #666666;
line-height: 150%;
text-align: left;
}
.body-content div a:link,
.body-content div a:visited, /* Yahoo! Mail Override. */
.body-content div a .yshortcuts /* Yahoo! Mail Override. */ {
color: #be1e2d;
font-weight: normal;
text-decoration: none;
}
.body-content img {
display: inline;
height: auto;
}
</style>
</head>
<body style="{{ body_css }}">
<center>
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="width: 100%; height: 100%; margin: 0; padding: 0; background-color: {{ wrapper_bg_color }};">
<tr>
<td align="center" valign="top" style="{{ table_td_css }}">
<br /><br />
<table border="0" cellpadding="0" cellspacing="0" width="600" style="background-color: #ffffff;">
<tr>
<td align="center" valign="top" style="{{ table_td_css }}">
{# Template Body. #}
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template-body">
<tr>
<td valign="top" class="body-content" style="{{ table_td_css }} background-color: #ffffff;">
{# Inner Content. #}
<table border="0" cellpadding="50" cellspacing="0" width="100%">
<tr>
<td valign="top" style="{{ table_td_css }}">
<div>
<br ><br >
{{ body }}
<br /><br />
{% if email_footer_signature %}
{{ email_footer_signature }}
<br /><br />
{% endif %}
{# Footer. #}
<table border="0" cellpadding="0" cellspacing="0" width="100%">
{% if email_logo_url %}
<tr>
<td valign="top" style="border-collapse: collapse; padding: 20px 0 0 0; border-top: 1px solid #e6e6e6;">
<a href="{{ site_path }}"><img src="{{ email_logo_url }}" alt="{{ site_name }} {{ 'Logo'|t }}" /></a>
</td>
</tr>
{% endif %}
{# Social Media Links. #}
{# Set from theme settings. #}
{% if facebook_url or twitter_url or instagram_url or youtube_url or linkedin_url or pinterest_url %}
<tr>
<td valign="top" style="border-collapse: collapse; padding: 5px 0 10px 0;">
{% if facebook_url %}
<a href="{{ facebook_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_facebook.gif" alt="{{ 'Facebook'|t }}" title="{{ 'Follow us on Facebook.'|t }}" style="border: none;" /></a>
{% endif %}
{% if twitter_url %}
<a href="{{ twitter_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_twitter.gif" alt="{{ 'Twitter'|t }}" title="{{ 'Follow us on Twitter.'|t }}" style="border: none;" /></a>
{% endif %}
{% if instagram_url %}
<a href="{{ instagram_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_instagram.gif" alt="{{ 'Instagram'|t }}" title="{{ 'Follow us on Instagram.'|t }}" style="border: none;" /></a>
{% endif %}
{% if youtube_url %}
<a href="{{ youtube_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_youtube.gif" alt="{{ 'YouTube'|t }}" title="{{ 'Follow us on YouTube.'|t }}" style="border: none;" /></a>
{% endif %}
{% if linkedin_url %}
<a href="{{ linkedin_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_linkedin.gif" alt="{{ 'LinkedIn'|t }}" title="{{ 'Follow us on LinkedIn.'|t }}" style="border: none;" /></a>
{% endif %}
{% if pinterest_url %}
<a href="{{ pinterest_url }}" style="text-decoration: none;"><img src="{{ image_path }}icon_pinterest.gif" alt="{{ 'Pinterest'|t }}" title="{{ 'Follow us on Pinterest.'|t }}" style="border: none;" /></a>
{% endif %}
</td>
</tr>
{% endif %}
<tr>
<td valign="top" style="border-collapse: collapse; padding: 0; font-family: Arial, sans-serif; font-size: 12px; color: #999999;">
{{ 'Copyright'|t }} © {{ 'now'|date('Y') }} <a href="{{ site_path }}" style="font-family: Arial, sans-serif; font-size: 12px; color: #999999; text-decoration: none; font-weight: normal;">{{ copyright_name ? copyright_name : site_name }}</a>
</td>
</tr>
</table>
{# / Footer. #}
</div>
</td>
</tr>
</table>
{# / Inner Content. #}
</td>
</tr>
</table>
{# / Template Body. #}
</td>
</tr>
</table>
<br /><br />
</td>
</tr>
</table>
</center>
</body>
</html>
