src/Application/Internit/SecurityBundle/Resources/views/Mail/Template-email/base.html.twig line 1

Open in your IDE?
  1. {# configurações gerais do sistema, como template de email #}
  2. {% set setting = getSetting() %}
  3. {# dados da construtora, como email e endereço #}
  4. {% set builder = getBuilder() %}
  5. {% set logo_header_url = '' %}
  6. {% set logo_footer_url = '' %}
  7. {% set headerBC = '' %}
  8. {% set headerFC = '' %}
  9. {% set footerBC = '' %}
  10. {% set footerFC = '' %}
  11. {% set addressString = '' %}
  12. {% set cityString = '' %}
  13. {% if setting is defined and setting is not empty %}
  14.   {% set logo_header_url %}
  15.     {% path setting.logo, 'admin' %}
  16.   {% endset %}
  17.   {% set logo_footer_url %}
  18.     {% path setting.logoFooter, 'admin' %}
  19.   {% endset %}
  20.   {% set headerBC = setting.headerBackgroundColor %}
  21.   {% set headerFC = setting.headerFontColor %}
  22.   {% set footerBC = setting.footerBackgroundColor %}
  23.   {% set footerFC = setting.footerFontColor %}
  24. {% endif %}
  25. {% if builder is defined and builder is not empty %}
  26.   {% set addressString = builder.getPartialAddress() %}
  27.   {% set cityString = builder.getAddressCity() %}
  28. {% endif %}
  29. <!DOCTYPE html>
  30. <html>
  31.   <head>
  32.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  33.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  34.     <link
  35.       href="https://fonts.googleapis.com/css?family=Montserrat:400,700,800,900&display=swap"
  36.       rel="stylesheet"
  37.     />
  38.   </head>
  39.   <body style="margin: 0; padding: 0; font-family: Calibri, Candara, Segoe,sans-serif;">
  40.     <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;background-color:white">
  41.       <tr>
  42.         <td style=" background-color:{{headerBC is empty ? '#efefef' : headerBC}};">
  43.           <a href="#" target="_blank"><img {#src="./assets/img/logo.png"#}
  44.             src="{{ absolute_url(asset(logo_header_url|trim)) }}"
  45.             style="display:block; margin: 35px auto;" border="0"/></a>
  46.         </td>
  47.       </tr>
  48.       <tr>
  49.         <td style="width:100%;">
  50.           <div style="margin: 50px;">
  51.             {% block email_content %}{% endblock %}
  52.           </div>
  53.         </td>
  54.       </tr>
  55.       <tr style="background-color:{{footerBC is empty ? '#efefef' : footerBC}};">
  56.         <td style="padding: 20px 0;">
  57.           <table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;">
  58.             <tr>
  59.               <td style="width:50%;">
  60.                 <a href="#" target="_blank" alt="{{ builder.name }}"><img {#src="./assets/img/logo-footer.png"#}
  61.                   src="{{ absolute_url(asset(logo_footer_url|trim)) }}" 
  62.                   style="display:block; margin: 35px auto;" border="0"/></a>
  63.               </td>
  64.               <td>
  65.                 <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
  66.                   <tr>
  67.                     <td>
  68.                       {% if builder.phone is not empty %}
  69.                       <a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="tel:{{ builder.phone }}">
  70.                       <img {#src="./assets/img/phone.png"#} 
  71.                         src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/phone.png')) }}"> {{ builder.phone }}</a>
  72.                       {% endif %}
  73.                     </td>
  74.                     <td>
  75.                       {% if builder.whatsapp is not empty %}
  76.                       <a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="tel:{{ builder.whatsapp }}">
  77.                       <img {#src="./assets/img/whatsapp.png"#} 
  78.                         src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/whatsapp.png')) }}"> {{ builder.whatsapp }}</a>
  79.                       {% endif %}
  80.                     </td>
  81.                   </tr>
  82.                 </table>
  83.                 <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; margin-top: 8px;">
  84.                   <tr>
  85.                     <td>
  86.                         {% if builder.contactEmails is defined and builder.contactEmails is not empty %}
  87.                         <a style="margin: 10px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="mailto:{{ builder.contactEmails[0].url }}">
  88.                         <img {#src="./assets/img/email.png"#} src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/email.png')) }}"> {{ builder.contactEmails[0].url }}</a>
  89.                         {% endif %}
  90.                     </td>
  91.                   </tr>
  92.                 </table>
  93.                 <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 242px; margin-top: 8px;">
  94.                   <tr>
  95.                     <td>
  96.                         <a target="_blank" style="margin: 10px 3px 10px 0px; color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px;" href="{{ builder.mapLink }}">
  97.                         <img {#src="./assets/img/map.png"#}
  98.                           src="{{ absolute_url(asset('bundles/applicationinternitsecurity/images/map.png')) }}" style="margin-left: 2px; margin-right: 0;"></a>
  99.                     </td>
  100.                     <td>
  101.                       <a style="color:{{footerFC is empty ? '#000' : footerFC}}; text-decoration:none; font-size: 13px; margin-top: 5px;" href="{{ builder.mapLink }}"> {{ addressString }}<br>{{ cityString }}</a>
  102.                     </td>
  103.                   </tr>
  104.                 </table>
  105.               </td>
  106.             </tr>
  107.           </table>
  108.         </td>
  109.       </tr>
  110.     </table>
  111.   </body>
  112. </html>