jfu-1.0.x-dev/templates/components/jfu_banner.html.twig
templates/components/jfu_banner.html.twig
{% if json_array.title is not empty %}
<h2 class="jfu-banner-item--title">{{ json_array.title }}</h2>
{% endif %}
<div class="slideshow-slick{{ classes }}">
{% for item in json_array.items.items %}
<div class="slide">
<div class="slideshow-item" >
<div class="banner-wrapper {{ json_array.options.type == 'center' ? 'banner-center' }} {{ json_array.options.type == 'fullcolor' ? 'banner-fullcolor' }}">
<div
class="banner-item {{ json_array.options.full_width ? 'container-full-width' : 'container' }}"
style="{{ json_array.options.type == 'fullcolor' ? 'background-color:'~ item.options.color1 ~ '; min-height: 200px;' }}">
{% if json_array.options.type != 'fullcolor' %}
{% if item.image.value is not empty or item.responsive_image.value is not empty %}
{% set responsive_image = item.responsive_image.value is not empty ? item.responsive_image : item.image %}
<div class="banner-item--image">
{% include '@jfu/components/jfu_' ~ item.image.type ~ '.html.twig' with {'json_array': item.image, 'responsive_image': responsive_image, 'type': json_array.type } %}
</div>
{% endif %}
{% endif %}
{% if item.title is not empty or
item.subtitle is not empty or
item.body.value is not empty or
item.link.value is not empty %}
<div class="banner-item--content">
{% if item.title is not empty %}
<h3
class="banner-item--title"
style="{{ json_array.options.type == 'fullcolor' ? 'color:'~ item.options.color2 ~ ';' }}">{{ item.title }}</h3>
{% endif %}
{% if item.subtitle is not empty %}
<h4
class="banner-item--subtitle"
style="{{ json_array.options.type == 'fullcolor' ? 'color:'~ item.options.color2 ~ ';' }}">{{ item.subtitle }}</h4>
{% endif %}
{% if item.body.value is not empty %}
<div
class="banenr-item--description"
style="{{ json_array.options.type == 'fullcolor' ? 'color:'~ item.options.color2 ~ ';' }}">
{% include '@jfu/components/jfu_' ~ item.body.type ~ '.html.twig' with {'json_array': item.body } %}
</div>
{% endif %}
{% if item.link.value is not empty %}
<div
class="banner-item--link"
style="{{ json_array.options.type == 'fullcolor' ? 'color:'~ item.options.color2 ~ ';' }}">
{% include '@jfu/components/jfu_' ~ item.link.type ~ '.html.twig' with {'json_array': item.link } %}
</div>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
