templates/includes/areas/images-with-detail-text.html.twig line 1

Open in your IDE?
  1. {% set isDecor = isDecor | default(false) %}
  2. {% set isSurface = isSurface | default(false) %}
  3. {% set isAnchorNavItem = isAnchorNavItem|default(false) %}
  4. {% set anchorNavTitle = anchorNavTitle|default(null) %}
  5. {% set anchorNavPosition = anchorNavPosition|default(null) %}
  6. <section class="content-block {{ anchorNavTitle }} {{ isAnchorNavItem ? 'js-anchor-nav__item' : '' }}"
  7.     {{ anchorNavTitle ? 'data-anchor-nav-title='~anchorNavTitle~'' : '' }}
  8.     {{ anchorNavPosition ? 'data-anchor-nav-position='~anchorNavPosition~'' : '' }}>
  9.     {% if isDecor %}
  10.         {% if object.isNew and (not decor.newUntilDate or dateIsCurrent(decor.newUntilDate))%}
  11.             <div class="position-relative ribbon-new__container ">
  12.         {% endif %}
  13.             {% if object.teaserImage %}
  14.                 <div class="ratio ratio-15x7">
  15.                     {{ object.teaserImage.thumbnail('product-landscape').html({
  16.                         imgAttributes:{
  17.                             class:'js-lazy-img ratio-item'
  18.                         },
  19.                         lowQualityPlaceholder:true
  20.                     })|raw }}
  21.                     <div class="ribbon-new__buttons">
  22.                         <div class="d-flex flex-row" style=" background-color: white;">
  23.                             {% if app.user %}
  24.                                 {{ include('includes/utils/wishlist-button.html.twig') }}
  25.                                 <hr style="border: calc(1rem/16) solid black; height: auto; margin:calc(10rem/16) 0;">
  26.                             {% endif %}
  27.                             {% if object.gallery.items is not empty %}
  28.                                 {{ include('includes/areas/multiple-image-download.html.twig', {
  29.                                     object: object,
  30.                                 }) }}
  31.                             {% endif %}
  32.                             {% if object.gallery.items is empty %}
  33.                                 {{ include('includes/areas/single-image-download.html.twig', { object: object }) }}
  34.                             {% endif %}
  35.                         </div>
  36.                     </div>
  37.                 </div>
  38.                 {% if object.isNew and (not decor.newUntilDate or dateIsCurrent(decor.newUntilDate))%}
  39.                     <div class="ribbon-new__ribbon">
  40.                         {{ 'badge.neu' | trans }}
  41.                     </div>
  42.                 {% endif %}
  43.             {% endif %}
  44.             <span class="mt-2">{{ 'detail.color may vary' | trans }}</span>
  45.             {% if object.isNew and (not decor.newUntilDate or dateIsCurrent(decor.newUntilDate)) %}
  46.                 </div>
  47.             {% endif %}
  48.     {% elseif isSurface %}
  49.         <div class="position-relative">
  50.             {% if object.teaserImage %}
  51.                 <div class="ratio ratio-15x7">
  52.                     {{ object.teaserImage.thumbnail('product-landscape').html({
  53.                         imgAttributes:{
  54.                             class:'js-lazy-img ratio-item'
  55.                         },
  56.                         lowQualityPlaceholder:true
  57.                     })|raw }}
  58.                 </div>
  59.                 <div class="position-absolute bottom-0 end-0">
  60.                     <a href="{{ object.teaserImage.thumbnail('product-landscape') }}"
  61.                        download="surface_{{ object.surfaceCode }}.jpg" class="btn btn-white btn--no-transition"><span
  62.                             class="btn__icon"><span
  63.                                 class="icon icon-download" aria-hidden="true"></span></span><span class="btn__text">{{ 'detail.download' | trans }}</span></a>
  64.                 </div>
  65.             {% endif %}
  66.         </div>
  67.     {% else %}
  68.         <div class="row gx-md-4 gx-2">
  69.             <div class="col-8">
  70.                 {% if object.teaserImage %}
  71.                     <div class="ratio ratio-10x7 h-100">
  72.                         {{ object.teaserImage.thumbnail('product-detail-big').html({
  73.                             imgAttributes:{
  74.                                 class:'js-lazy-img ratio-item'
  75.                             },
  76.                             lowQualityPlaceholder:true
  77.                         }) | raw }}
  78.                     </div>
  79.                 {% endif %}
  80.             </div>
  81.             <div class="col-4">
  82.                 <div class="vertical-gutter gy-md-4 gy-2">
  83.                     {% for image in object.gallery %}
  84.                         <div class="vertical-gutter__item">
  85.                             <div class="ratio ratio-10x7">
  86.                                 {{ image.thumbnail('product-detail-small').html({
  87.                                     imgAttributes:{
  88.                                         class:'js-lazy-img ratio-item'
  89.                                     },
  90.                                     lowQualityPlaceholder:true
  91.                                 }) }}
  92.                             </div>
  93.                         </div>
  94.                     {% endfor %}
  95.                 </div>
  96.             </div>
  97.         </div>
  98.     {% endif %}
  99.     {% if shortDescriptionTitle and shortDescription %}
  100.         <div class="mt-4">
  101.             {{ include('includes/title-blocks/title-block.html.twig', {
  102.                 className: 'mb-2',
  103.                 title: shortDescriptionTitle,
  104.                 titleTag:'h2',
  105.                 titleStyle:'h4',
  106.                 subtitle:null
  107.             }) }}
  108.             <div class="wysiwyg">
  109.                 {{ shortDescription|raw }}
  110.             </div>
  111.         </div>
  112.     {% endif %}
  113. </section>