Skip to content

Commit

Permalink
bug #37395 add .body wrapper element (Nemo64)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

add .body wrapper element

This change makes the notification email responsive.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT

There was a wrapper missing from the foundation template.
This wrapper applies all `table.body table.container` styles from the foundation stylesheet
including font's and the responsive rules that were missing.

Commits
-------

5b74bbd add .body wrapper element
  • Loading branch information
fabpot committed Jun 24, 2020
2 parents 98acf1c + 5b74bbd commit aeb0946
Showing 1 changed file with 46 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,56 @@
</head>
<body>
<spacer size="32"></spacer>
<container class="body_{{ ("urgent" == importance ? "alert" : ("high" == importance ? "warning" : "default")) }}">
<spacer size="16"></spacer>
<row>
<columns large="12" small="12">
{% block lead %}
<small><strong>{{ importance|upper }}</strong></small>
<p class="lead">
{{ email.subject }}
</p>
{% endblock %}
<wrapper class="body">
<container class="body_{{ ("urgent" == importance ? "alert" : ("high" == importance ? "warning" : "default")) }}">
<spacer size="16"></spacer>
<row>
<columns large="12" small="12">
{% block lead %}
<small><strong>{{ importance|upper }}</strong></small>
<p class="lead">
{{ email.subject }}
</p>
{% endblock %}

{% block content %}
{% if markdown %}
{{ include('@email/zurb_2/notification/content_markdown.html.twig') }}
{% else %}
{{ (raw ? content|raw : content)|nl2br }}
{% endif %}
{% endblock %}
{% block content %}
{% if markdown %}
{{ include('@email/zurb_2/notification/content_markdown.html.twig') }}
{% else %}
{{ (raw ? content|raw : content)|nl2br }}
{% endif %}
{% endblock %}

{% block action %}
{% if action_url %}
<spacer size="16"></spacer>
<button href="{{ action_url }}">{{ action_text }}</button>
{% endif %}
{% endblock %}
{% block action %}
{% if action_url %}
<spacer size="16"></spacer>
<button href="{{ action_url }}">{{ action_text }}</button>
{% endif %}
{% endblock %}

{% block exception %}
{% if exception %}
<spacer size="16"></spacer>
<p><em>Exception stack trace attached.</em></p>
{% endif %}
{% endblock %}
</columns>
</row>
{% block exception %}
{% if exception %}
<spacer size="16"></spacer>
<p><em>Exception stack trace attached.</em></p>
{% endif %}
{% endblock %}
</columns>
</row>

<wrapper class="secondary">
<spacer size="16"></spacer>
{% block footer %}
<row>
<columns small="12" large="6">
{% block footer_content %}
<p><small>Notification e-mail sent by Symfony</small></p>
{% endblock %}
</columns>
</row>
{% endblock %}
</wrapper>
</container>
<wrapper class="secondary">
<spacer size="16"></spacer>
{% block footer %}
<row>
<columns small="12" large="6">
{% block footer_content %}
<p><small>Notification e-mail sent by Symfony</small></p>
{% endblock %}
</columns>
</row>
{% endblock %}
</wrapper>
</container>
</wrapper>
</body>
</html>
{% endapply %}

0 comments on commit aeb0946

Please sign in to comment.