Browse Source

Add {% spaceless %} tags to reduce uncompressed email size

If the email body is above a certain size, Gmail trims it
and displays "[Message clipped]  View entire message" at
the end. The spaceless tag is a quick fix to reduce
HTML size a bit and allow more table rows to fit before
clipping.
master
Pēteris Caune 3 years ago
parent
commit
d2c701fb77
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 5 additions and 1 deletions
  1. +3
    -1
      templates/emails/summary-downtimes-html.html
  2. +2
    -0
      templates/emails/summary-html.html

+ 3
- 1
templates/emails/summary-downtimes-html.html View File

@ -1,5 +1,6 @@
{% load humanize hc_extras %}
{% regroup checks by project as groups %}
{% spaceless %}
<table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
{% for group in groups %}
<tr>
@ -81,4 +82,5 @@
{% endfor %}
{% endfor %}
</table>
<br />
<br />
{% endspaceless %}

+ 2
- 0
templates/emails/summary-html.html View File

@ -1,5 +1,6 @@
{% load humanize hc_extras %}
{% regroup checks by project as groups %}
{% spaceless %}
<table style="margin: 0; width: 100%; font-size: 16px;" cellpadding="0" cellspacing="0">
{% for group in groups %}
<tr>
@ -70,3 +71,4 @@
{% endfor %}
</table>
<br />
{% endspaceless %}

Loading…
Cancel
Save