{# configurações gerais do sistema, como template de email #}
{% set setting = getSetting() %}
{# dados da construtora, como email e endereço #}
{% set builder = getBuilder() %}
{% set logo_header_url = '' %}
{% set logo_footer_url = '' %}
{% set headerBC = '' %}
{% set headerFC = '' %}
{% set footerBC = '' %}
{% set footerFC = '' %}
{% set addressString = '' %}
{% set cityString = '' %}
{% if setting is defined and setting is not empty %}
{% set logo_header_url %}
{% path setting.logo, 'admin' %}
{% endset %}
{% set logo_footer_url %}
{% path setting.logoFooter, 'admin' %}
{% endset %}
{% set headerBC = setting.headerBackgroundColor %}
{% set headerFC = setting.headerFontColor %}
{% set footerBC = setting.footerBackgroundColor %}
{% set footerFC = setting.footerFontColor %}
{% endif %}
{% if builder is defined and builder is not empty %}
{% set addressString = builder.getPartialAddress() %}
{% set cityString = builder.getAddressCity() %}
{% endif %}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:400,700,800,900&display=swap"
rel="stylesheet"
/>
</head>
<body style="margin: 0; padding: 0; font-family: Calibri, Candara, Segoe,sans-serif;">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;background-color:white">
<tr>
<td style=" background-color:{{headerBC is empty ? '#efefef' : headerBC}};">
<a href="#" target="_blank"><img {#src="./assets/img/logo.png"#}
src="{{ absolute_url(asset(logo_header_url|trim)) }}"
style="display:block; margin: 35px auto;" border="0"/></a>
</td>
</tr>
<tr>
<td style="width:100%;">
<div style="margin: 50px;">
{% block email_content %}{% endblock %}
</div>
</td>
</tr>
<tr style="background-color:{{footerBC is empty ? '#efefef' : footerBC}};">
<td style="padding: 20px 0;">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;">
<tr>
<td style="width:50%;">
<a href="#" target="_blank" alt="{{ builder.name }}"><img {#src="./assets/img/logo-footer.png"#}
src="{{ absolute_url(asset(logo_footer_url|trim)) }}"
style="display:block; margin: 35px auto;" border="0"/></a>
</td>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
<tr>
<td>
{% if builder.phone is not empty %}
<a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="tel:{{ builder.phone }}">
<img {#src="./assets/img/phone.png"#}
src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/phone.png')) }}"> {{ builder.phone }}</a>
{% endif %}
</td>
<td>
{% if builder.whatsapp is not empty %}
<a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="tel:{{ builder.whatsapp }}">
<img {#src="./assets/img/whatsapp.png"#}
src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/whatsapp.png')) }}"> {{ builder.whatsapp }}</a>
{% endif %}
</td>
</tr>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; margin-top: 8px;">
<tr>
<td>
{% if builder.contactEmails is defined and builder.contactEmails is not empty %}
<a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="mailto:{{ builder.contactEmails[0].url }}">
<img {#src="./assets/img/email.png"#} src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/email.png')) }}"> {{ builder.contactEmails[0].url }}</a>
{% endif %}
</td>
</tr>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 242px; margin-top: 8px;">
<tr>
<td>
<a target="_blank" style="margin: 10px 3px 10px 0px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="{{ builder.mapLink }}">
<img {#src="./assets/img/map.png"#}
src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/map.png')) }}" style="margin-left: 2px; margin-right: 0;"></a>
</td>
<td>
<a style="color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px; margin-top: 5px;" href="{{ builder.mapLink }}"> {{ addressString }}<br>{{ cityString }}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>