blocks/RetailBlock/block.html.twig line 1

Open in your IDE?
  1. {% if data.retails|default %}
  2.     {% for retail in data.retails %}
  3.         {% if data.retail_info|default == 'map' %}
  4.             {% if retail.iframeMap|default %}
  5.                 <iframe src="{{ retail.iframeMap }}" width="100%" height="100%" style="border:0;"
  6.                         allowfullscreen=""
  7.                         loading="lazy"></iframe>
  8.             {% endif %}
  9.         {% else %}
  10.             <div id="{{ id }}"
  11.                  class="{{ className }} flex flex-col text-sm text-start items-start font-light">
  12.                 {% if data.retail_info|default == 'all' %}
  13.                     <span class="font-title text-base font-semibold uppercase pb-2">{{ retail.publicName }}</span>
  14.                 {% else %}
  15.                     <span class="font-title text-base font-semibold uppercase pb-2">{{ retail.publicName }}</span>
  16.                 {% endif %}
  17.                 {% if retail.addressLine|default %}
  18.                     {% if retail.googleBusinessProfileLink|default %}
  19.                         <a href="{{ retail.googleBusinessProfileLink }}" target="_blank" rel="nofollow">
  20.                     {% endif %}
  21.                     <span>{{ retail.addressLine }}{% if retail.sublocality|default %}{{ ', ' ~ retail.sublocality }}{% endif %}</span>
  22.                     <br><span>{{ retail.postalCode ~ ' ' ~ retail.locality }}</span>
  23.                     {% if retail.googleBusinessProfileLink|default %}
  24.                         </a>
  25.                     {% endif %}
  26.                 {% endif %}
  27.                 {% if retail.phones|default %}
  28.                     {% for phone in retail.phones %}
  29.                         {% if phone.type == 'main' %}
  30.                             <a href="tel:+34{{ phone.number|raw|replace({' ': ''}) }}"
  31.                                class="font-light">{{ phone.number }}</a>
  32.                         {% elseif phone.type == 'whatsapp' %}
  33.                             <a href="https://api.whatsapp.com/send?phone=34{{ phone.number|raw|replace({' ': ''}) }}&amp;text=Hola,%20me%20gustaría%20saber%20más%20información%20sobre%3a%20"
  34.                                class="font-light">{{ phone.number }}</a>
  35.                         {% endif %}
  36.                     {% endfor %}
  37.                 {% endif %}
  38.                 {% if retail.emails|default %}
  39.                     {% for email in retail.emails %}
  40.                         <a href="mailto:{{ email.address }}"
  41.                            class="font-light">{{ email.address }}</a>
  42.                     {% endfor %}
  43.                 {% endif %}
  44.                 {% if data.retail_info|default == 'all' %}
  45.                     {% if retail.googleBusinessProfileLink|default %}
  46.                         <a href="{{ retail.googleBusinessProfileLink }}" target="_blank" rel="nofollow">Ver en
  47.                             Google
  48.                             Maps</a>
  49.                     {% endif %}
  50.                 {% endif %}
  51.                 {% if data.retail_info|default == 'all' %}
  52.                     {% if retail.openingHours|default %}
  53.                         <span class="font-title text-base font-bold uppercase pb-2 pt-8">Horarios</span>
  54.                         <span>{{ retail.openingHours|raw }}</span>
  55.                     {% endif %}
  56.                 {% endif %}
  57.                 {% if retail.social|default %}
  58.                     <div class="social flex flex-row gap-3 pt-6 pb-8">
  59.                         {% for social in retail.social %}
  60.                             <a href="{{ social.link }}" target="_blank" rel="nofollow">
  61.                                 {% include '@RetailBlock/assets/' ~ (social.network) ~ '.svg' %}
  62.                             </a>
  63.                         {% endfor %}
  64.                     </div>
  65.                 {% endif %}
  66.             </div>
  67.         {% endif %}
  68.     {% endfor %}
  69. {% endif %}