2023-02-01 09:03:27 +01:00
|
|
|
{% set widgetname="slide" %}
|
|
|
|
{% extends 'Pagewidget/widget.twig' %}
|
|
|
|
|
|
|
|
{% block widgetaction %}
|
|
|
|
{% if canadd %}
|
|
|
|
<i title="Gérer le Carrousel" class="fa fa-th" onClick="listSlide({{ entity.id }})"></i>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block widgetbody %}
|
|
|
|
{% set intervalmilli = interval * 1000 %}
|
|
|
|
|
|
|
|
<div class="{{ (slides|length > 1 ? "slick" : "") }}" data-slicktime='{{ intervalmilli }}'>
|
|
|
|
{% if slides is empty and canadd %}
|
|
|
|
<div class="pt-5 text-center">
|
|
|
|
<i title="Gérer le Carrousel" class="fa fa-th fa-5x" onClick="listSlide({{ entity.id }})" style="cursor:pointer"></i><br>
|
|
|
|
Gérer le Carrousel
|
2023-01-12 16:14:31 +01:00
|
|
|
</div>
|
2023-02-01 09:03:27 +01:00
|
|
|
{% endif %}
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-02-01 09:03:27 +01:00
|
|
|
{% for slide in slides %}
|
|
|
|
{% if slide.url is not empty %}
|
|
|
|
{% set url=slide.url|replace({'#login#': username}) %}
|
|
|
|
{% if slide.target == 'frame' %}
|
|
|
|
<a class="item-link" onClick="showItemframe(slide{{ slide.id }}','{{ url }}')">
|
2023-01-12 16:14:31 +01:00
|
|
|
{% else %}
|
2023-02-01 09:03:27 +01:00
|
|
|
<a class="item-link" href="{{ url }}" target="{{ slide.target }}">
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
<div style="background-image:url({{ path("app_minio_image",{file:slide.image}) }}); background-size:cover; background-position: center; min-height:200px;{{(entity.autoajust ? "" : "height:"~entity.height~"px;")}}">
|
|
|
|
<div class="p-3">
|
|
|
|
{% if slide.title is not empty %}
|
|
|
|
<h1 class="slicktitle" style="{{colorbodyfont}};">{{slide.title}}</h1>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if slide.subtitle is not empty %}
|
|
|
|
<span class="slicksubtitle" style="{{colorbodyfont}};">{{slide.subtitle}}</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-02-01 09:03:27 +01:00
|
|
|
{% if slide.url is not empty %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-01-12 16:14:31 +01:00
|
|
|
|
2023-02-01 09:03:27 +01:00
|
|
|
{% endblock %}
|
2023-01-12 16:14:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|