templates/Shop/product_teaser.html.twig line 5

Open in your IDE?
  1. {% set productImg = product.getFirstImageAsset %}
  2. {% if not editmode %}
  3.     {% set linkDetail = app_product_generate_link(product, { 'document' : document, 'prefix': prefix } , {}) %}
  4. {% endif %}
  5. {% set defaultPrice = app_product_default_price(product) %}
  6. {#{% set defaultPriceWithDiscount = app_product_default_price_with_discount(product,userIdSage) %}#}
  7. <style>
  8.     .card-img-top {
  9.         position: absolute;
  10.         top: -50px;
  11.         left: 50%;
  12.         margin-left: -50px;
  13.         width: 100px !important;
  14.         height: 100px;
  15.         transition: transform 0.3s ease;
  16.     }
  17.     .card:hover .card-img-top {
  18.         transform: scale(1.2);
  19.     }
  20.     .card {
  21.         font-family: "Roboto";
  22.         text-transform: lowercase;
  23.         margin-top: 30px;
  24.         padding-top: 30px;
  25.         box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
  26.         height: 170px;
  27.     }
  28.     .card a {
  29.         color: inherit;
  30.     }
  31.     .card-title {
  32.         display: block;
  33.         font-weight: 600;
  34.     }
  35.     .card-title:first-letter {
  36.         text-transform: uppercase;
  37.     }
  38.     .card:hover .card-title {
  39.         color: #106eea;
  40.     }
  41.     @media (max-width: 991px) {
  42.         .col-md-3,
  43.         .col-6 {
  44.             flex: 0 0 50%;
  45.             max-width: 50%;
  46.         }
  47.         .card {
  48.             height: 250px;
  49.             padding-top: 10px;
  50.         }
  51.     }
  52.     @media (min-width: 768px) and (max-width: 991px) {
  53.         .col-md-3,
  54.         .col-6 {
  55.             width: 100%;
  56.             flex: 0 0 50%;
  57.             max-width: 50%;
  58.         }
  59.         .card {
  60.             height: 250px;
  61.             width: 200px;
  62.             padding-top: 10px;
  63.             margin: 10px 100px 10px 90px;
  64.         }
  65.     }
  66.     @media (min-width: 991px) {
  67.         .card {
  68.             height: 250px;
  69.         }
  70.     }
  71. </style>
  72. <div class="col-6 col-sm-6 col-md-3 mt-5">
  73.     <div class="card">
  74.         <a href="{{ editmode ? '#':linkDetail }}" class="px-3">
  75.             <img class="card-img-top" src="{{ (productImg) ? productImg.thumbnail('ProductImages') : '' }}" alt="Card image cap">
  76.             <div class="card-block text-center mt-5">
  77.                 <span class="card-title fs-6">{{ product.getName() }}</span>
  78.                 {# if product have propspeed brand hide price #}
  79. {#                {% if is_authenticated or product.marca != 15663 %}#}
  80. {#                    <p class="card-position card-price fs-6">{{ app_helper_price_format_spain(defaultPrice) }}€</p>#}
  81. {#                {% endif %}#}
  82.             </div>
  83.         </a>
  84.     </div>
  85. </div>