postoffice-1.0.x-dev/extensions/postoffice_skel/templates/postoffice-skel.html.twig

extensions/postoffice_skel/templates/postoffice-skel.html.twig
{#
/**
 * @file
 * Default template for postoffice email skeleton.
 *
 * Variables:
 * - langcode: The two-letter language code.
 * - email: The symfony mime mail object. E.g., use email.getSubject in the title
 *     and email.getHtmlBody in order to retrieve the body.
 * - background_color: Body background color. Defaults to #ffffff.
 * - container_width: Width of the container. Defaults to 680.
 *
 * Blocks (when using {% embed %} from within a theme):
 * - meta: Meta tags in head section. Default sets charset to utf-8, sets
 *     responsive viewport and triggers IE to use edge engine.
 * - subject: Title tag in head section. Default sets title from email.getSubject
 * - head: Remaining head tags (fonts, style, etc.). Default is empty.
 * - preview: A place for preview text markup. Default is empty.
 *     https://stackoverflow.design/email/guidelines/faq/#what-is-preview-text?
 * - content: All email content. Defaults to raw email.getHtmlBody
 *
 * This email skeleton is based on cerberus.
 * https://www.cerberusemail.com/
 */
 #}

{%- set background_color = background_color|default('#ffffff') -%}
{%- set container_width = container_width|default(680) -%}
<!DOCTYPE html>
<html{{ html_attributes.setAttribute('lang', langcode) }}>
<head>
  {% block meta %}
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  {% endblock %}
  {% block subject %}
    <title>{{ email.getSubject }}</title>
  {% endblock %}
  {% block head %}
  {% endblock %}
</head>
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: {{ background_color }};">
  <center role="article" aria-roledescription="email" lang="{{ langcode }}" style="width: 100%; background-color: {{ background_color }};">
    <!--[if mso | IE]>
    <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: {{ background_color }};">
    <tr>
    <td>
    <![endif]-->

      {% block preview %}
      {% endblock %}

      <div{{ attributes.addClass('email-container')}} style="max-width: {{ container_width }}px; margin: 0 auto;">
        <!--[if mso]>
        <table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="{{ container_width }}">
        <tr>
        <td>
        <![endif]-->

        {% block content %}
          {{ email.getHtmlBody|raw }}
        {% endblock %}

        <!--[if mso]>
        </td>
        </tr>
        </table>
        <![endif]-->
      </div>

    <!--[if mso | IE]>
    </td>
    </tr>
    </table>
    <![endif]-->
  </center>
</body>
</html>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc