{if $slider.images|count}
   <div class="home-slider-sections" id="home-slider-sections">
      <div class="container">
         <div data-wpj-carousel class="home-sections-carousel">
            {foreach $slider.images as $image}
               <div class="home-section-item item-{$image.custom_data['color']|default:'dark'}"
                    data-tracking-view='{get_gtm_data type='ecommerce' method='PromotionImpression' encode=true data=['slider' => $slider, 'position' => $image@iteration]}'
                    data-pos="{$image@iteration}">
                  <a{if $image.link} href="{$image.link}"
                     data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='PromotionClick' data=['slider' => $slider, 'slide' => $image, 'position' => $image@iteration]}'
                          {/if} >
                     {$photo_dimensions = $cfg.Photo.types["slider_squares"].size}
                     <picture>
                        <img src="{get_photo photo=$image.photo size='slider_squares'}" class="img-fluid" alt=""
                             width="{$photo_dimensions[0]}"
                             height="{$photo_dimensions[1]}" loading="lazy">
                     </picture>
                     {if $image.link}
                        <span class="h2 btn btn-link" data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='PromotionClick' data=['slider' => $slider, 'slide' => $image, 'position' => $image@iteration]}'>{$image.custom_data.btn|default:"{t}Prohlédnout{/t}"}</span>
                     {/if}
                  </a>
               </div>
            {/foreach}
         </div>
      </div>
   </div>
{/if}
