templates/frontend/partials/_call_to_action_card.html.twig line 1

Open in your IDE?
  1. {% set url = callToAction.url %}
  2. {% if callToAction.document.path %}
  3.     {% set url = callToAction.document.publicUrl %}
  4. {% endif %}
  5. {% if callToAction.whiteRabbit %}
  6.     {% set url = path('app_download', {callToAction: callToAction.slug}) %}
  7. {% endif %}
  8. <div class="mb-4 {{ size }}">
  9.     {% if callToAction.ctaCover.path %}
  10.         <a href="{{ url }}" {% if not callToAction.whiteRabbit %}target="_blank"{% endif %} aria-label="{{ callToAction.title }}">
  11.             <img class="img-fluid" src="{{ callToAction.ctaCover.publicUrl }}" alt="{{ callToAction.title }}">
  12.         </a>
  13.     {% else %}
  14.         <div class="bg-primary p-3 p-lg-5 h-100">
  15.             <div class="row justify-content-between align-items-center">
  16.                 <div class="col-lg-4">
  17.                     <h3 class="fw-bold text-white">{{ callToAction.title }}</h3>
  18.                     <p class="fs-lg mb-0 text-white">{{ callToAction.description }}</p>
  19.                 </div>
  20.                 <div class="col-lg-2 mt-3 mt-lg-0">
  21.                     <a href="{{ url }}" {% if not callToAction.whiteRabbit %}target="_blank"{% endif %} class="btn btn-white fw-bold w-100">Scopri</a>
  22.                 </div>
  23.             </div>
  24.         </div>
  25.     {% endif %}
  26. </div>