forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslider.tpl
More file actions
56 lines (51 loc) · 2.76 KB
/
slider.tpl
File metadata and controls
56 lines (51 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{if $homeslider.slides}
<section class="ps-imageslider">
<div
id="ps_imageslider"
class="carousel slide"
{if $homeslider.speed > 0}data-bs-ride="carousel"{/if}
{if $homeslider.pause !== "hover"}data-bs-pause="false"{/if}
{if $homeslider.wrap === "false"}data-bs-wrap="false"{/if}
>
<div class="carousel-indicators">
{foreach from=$homeslider.slides item=slide name='homeslider'}
<button
type="button"
data-bs-target="#ps_imageslider"
data-bs-slide-to="{$slide@index}"
aria-label="{l s='Go to slide %slide_index%' sprintf=['%slide_index%'=> $slide@iteration] d='Shop.Theme.Global'}"
class="outline {if $slide@first}active{/if}"
{if $slide@first}aria-current="true"{/if}
></button>
{/foreach}
</div>
<div class="carousel-inner" role="list" aria-label="{l s='Carousel container' d='Shop.Theme.Global'}">
{foreach from=$homeslider.slides item=slide name='homeslider'}
<div class="carousel-item{if $slide@first} active{/if}" role="listitem"{if $homeslider.speed > 0} data-bs-interval="{$homeslider.speed}"{/if}>
{if !empty($slide.url)}<a class="ps-imageslider__link outline d-block h-100 text-body" href="{$slide.url}">{/if}
<figure class="ps-imageslider__figure">
<img class="w-100" src="{$slide.image_url}" alt="{$slide.legend|escape}" {if $slide@first}fetchpriority="high"{else}loading="lazy"{/if} width="{$slide.sizes[0]}" height="{$slide.sizes[1]}">
{if $slide.title || $slide.description}
<figcaption class="ps-imageslider__figcaption carousel-caption d-none d-lg-block fs-5">
{if $slide.title}<h2 class="h1 text-uppercase">{$slide.title}</h2>{/if}
{if $slide.description}<div>{$slide.description nofilter}</div>{/if}
</figcaption>
{/if}
</figure>
{if !empty($slide.url)}</a>{/if}
</div>
{/foreach}
</div>
<button class="carousel-control-prev outline outline--rounded" type="button" data-bs-target="#ps_imageslider" data-bs-slide="prev" aria-label="{l s='Previous' d='Shop.Theme.Actions'}">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
</button>
<button class="carousel-control-next outline outline--rounded" type="button" data-bs-target="#ps_imageslider" data-bs-slide="next" aria-label="{l s='Next' d='Shop.Theme.Actions'}">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
</button>
</div>
</section>
{/if}