templates.email.base.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of email-template-builder Show documentation
Show all versions of email-template-builder Show documentation
let this service generate your custom html/text emails
The newest version!
{% if header != null %}{{ title }} {% endif %}
{% macro styleMargin(alignment,bottom="20px") %}
{% if alignment == 'LEFT' %}
margin: 0 0 {{bottom}} 0
{% elseif alignment == 'CENTER' %}
margin: 0 auto {{bottom}} auto
{% else %}
margin: 0 0 {{bottom}} auto
{% endif %}
{% endmacro %}
{% if logo is not empty %}
{% if logo.linkUrl is not empty %}{% endif %}
{% if logo.linkUrl is not empty %}{% endif %}
{% endif %}
{% if header is not empty %}
{{ header.title }}
{% endif %}
{% for line in lines %}
{% if line.type == 'TEXT' %}
{% if line.asHtml %}
{{ line.text | raw}}
{% else %}
{{ line.text }}
{% endif %}
{% elseif line.type == 'IMAGE' %}
{% if line.linkUrl is not empty %}{% endif %}
0 %}width="{{- line.width -}}"{% endif %} {% if line.height > 0 %}height="{{- line.height -}}"{% endif %} alt="{{- line.alt -}}" title="{{- line.title -}}"
style="color: #000000; font-size: 10px; {{- styleMargin(alignment=line.alignment,bottom="0") -}}; padding: 0; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; border: none; display: block;{% if line.width <= 0 and line.height <= 0 %}width: 100%; min-width:100%; height: auto;{% endif %}" />
{% if line.linkUrl is not empty %}{% endif %}
{% elseif line.type == 'BUTTON' %}
{{ line.text }}
{% elseif line.type == 'TABLE' %}
{% if line.headerLine is not empty %}
{% if line.headerLine.asHtml %}
{{ line.headerLine.text | raw}}
{% else %}
{{ line.headerLine.text }}
{% endif %}
{% endif %}
{% for row in line.rows %}
{% if row.type == 'ITEM' %}
{% if line.hasPrefixColumn %}{{- row.prefix | default('') -}} {% endif %}
{{- row.product | default('') -}}
{% if line.hasMiddleColumn %}{{- row.middle | default('') -}} {% endif %}
{{- row.price | default('') -}}
{% elseif row.type == 'TOTAL' %}
{{- row.total | default('') -}}
{{- row.price | default('') -}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% if footers is not empty or copyright is not null %}
{% endif %}