templates/Components/product-item.html.twig line 1

Open in your IDE?
  1. <!-- This template require [index, id, name, href, image, shortDescription, fallbackImage] -->
  2. <div class="col-xl-3  col-lg-3 col-md-4 col-sm-6 mb-5 mb-lg-5 mb-md-5 d-flex flex-column justify-content-center align-items-center text-center">
  3.     <div class="position-relative">
  4.         <a href="{{ product.href }}" class="d-flex flex-column align-items-center" style="max-width: fit-content;">
  5.             <div class="productCircle" style="background-image: url({{ image ? image.getThumbnail('Stoelting_neuroscience_circle') }}), url({{ image ? '' : fallbackImage }});">
  6.             </div>
  7.             <h5 class="font-weight-bold text-navyBlue mt-4 mt-lg-4 mt-md-4 mb-0 mb-0">{{ product.name }}</h5>
  8.         </a>
  9.         <div class="productCircle__info"
  10.              {# 'modal' thumbnail needs to be configured #}
  11.                     data-thumbnail="{{ product.image ? product.image.getThumbnail('modal') : product.fallbackImage }}"
  12.                     data-title="{{ product.name }}"
  13.                     data-text="{{ product.shortDescription }}"
  14.                     data-toggle="modal"
  15.                     data-target="#productInfo-{{product.id}}">
  16.                 </div>
  17.     </div>
  18. </div>
  19. {% include "Components/productInfoModal.html.twig" with {
  20.     image: product.image,
  21.     name: product.name,
  22.     shortDescription: product.shortDescription,
  23.     link: product.href,
  24.     price: product.minPrice,
  25.     id: product.id
  26. } %}