{% set UID = uniqid() %}
{% set imageAttributes = {
"attributes" : {
"data-speed": "-1"
}
} %}
<div class="section" id="content-section">
<div id="{{ 'uid' ~ UID |raw }}" class="text-background {% if item.getBackgroundImage %}has-background-image js{% else %}has-background{% endif %}">
{% if item.getBackgroundImage %}
<div class="background-image">
<div class="image">
{{ item.getBackgroundImage().getThumbnail("textBackgroundImage" ~ bundleName).getHtml(imageAttributes) |raw }}
{#IE Fix for thumbnails rendering start#}
<style>
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
{{ 'div#uid' ~ UID |raw }} .background-image > .image {
position: absolute;
width: 100%;
height: 100%;
background: url( {{ pimcore_image("getBackgroundImage").getSrc() }} ) center right 100%/cover no-repeat;
}
{{ 'div#uid' ~ UID |raw }} .background-image > .image img {
display: none;
}
}
</style>
{#IE Fix for thumbnails rendering end#}
</div>
</div>
{% endif %}
{% if item.getBackgroundImage %}
<div class="content-container">
{% endif %}
<div class="main-content flex-col">
<div class="col xs-12">
<div class="text-only">
{{ item.getText() |raw }}
{% if item.getButton %}
<div class="button">
<a href="{{ item.getButton.getHref() }}" class="button btn-default">
{{ item.getButton.getText() |raw }}
</a>
</div>
{% endif %}
</div>
</div>
</div>
{% if item.getBackgroundImage %}
</div>
{% endif %}
</div>
</div>