{% set productLink = pimcore_href("selectProduct").getElement() %}
{% set spacingSelect %}
{{ pimcore_checkbox("checkSpacing", {
"reload": true
}) }}
{% endset %}
{% set noSpacingTop = '' %}
{% set brickAnchorId = '' %}
{% if pimcore_checkbox('checkSpacing').isChecked() %}
{% set noSpacingTop = 'no-offset-top' %}
{% endif %}
{% set UID = uniqid() %}
{% if pimcore_input("brickAnchorIdInput") is not empty %}
{% set brickAnchorId = pimcore_input("brickAnchorIdInput")|lowercase %}
{% endif %}
{% if editmode %}
<div class="flex-col offset-bottom-single">
<div class="col xs-12 m-6 l-3">
<span class="hint">{{ 'ID für Anchorlinks vergeben' |trans }}</span>
{{ pimcore_input("brickAnchorIdInput") }}
</div>
<div class="col xs-12 m-6 l-2">
<div class="select-items">
<div class="hint">
{{ 'Kein Abstand nach oben?' |trans }}
</div>
{{ spacingSelect }}
</div>
</div>
</div>
<div class="flex-col offset-bottom-single">
<div class="col xs-12 m-6">
<span class="hint">
{{ 'Verlinkung zu bestehendem Produkt?'|trans }}</span>
{{ pimcore_href("selectProduct", {
"types": ["object"],
"subtypes": {
"types": ["object"],
},
"width": 300,
"reload": true
}) }}
</div>
<div class="col xs-12 m-6">
<div class="input-space">
<span class="hint">{{ 'Hintergrundbild festlegen' |trans }}</span>
{{ pimcore_image("teaserInterstitialImage", {
"title": "Drag your image here",
"width": 300,
"height": 150,
"thumbnail": "teaserInterstitialImage" ~ bundleName,
"reload": true
}) }}
</div>
</div>
</div>
{% endif %}
{% set imageAttributes = {
"attributes" : {
"data-speed": "-1"
}
} %}
{% if productLink == true %}
{% set detailViewUri = pimcore_url(
{
"name": productLink.getName()|sanitized_url,
"articlenumber": productLink.getArticleNumber()
},
"shopHandlerProductDetail"
) %}
{% endif %}
<div id="{{ brickAnchorId }}" class="section {{ noSpacingTop }}">
<div id="{{ 'uid' ~ UID |raw }}"
class="teaser-interstitial {% if pimcore_image("teaserInterstitialSmallImage") and pimcore_link('productLink') is not empty %}with-image-absolute{% endif %} has-background-image js">
<div class="background-image">
{% if pimcore_image("teaserInterstitialImage").getThumbnail("teaserInterstitialImage" ~ bundleName) is not empty %}
<div class="image">
{{ pimcore_image("teaserInterstitialImage").getThumbnail("teaserInterstitialImage" ~ bundleName).getHTML(imageAttributes) |raw }}
</div>
{#IE Fix for thumbnails rendering start#}
<script type='text/javascript'>
var waitForJQuery = setInterval(function () {
if (typeof $ != 'undefined') {
$(function() {
if (navigator.userAgent.match(/msie/i) || navigator.userAgent.match(/trident/i) ){
$(".teaser-interstitial .background-image .image").css({
position: "absolute",
width: "100%",
height: "100%",
background: "url( {{ pimcore_image("teaserInterstitialImage").getSrc() }} ) center right 100%/cover no-repeat"
});
$(".teaser-interstitial .background-image .image img").hide();
}
});
clearInterval(waitForJQuery);
}
}, 50);
</script>
{#IE Fix for thumbnails rendering end#}
{% endif %}
</div>
<div class="content-container flex-col">
<div class="col teaser-interstitial-content main-content flex-col">
<div class="headline-container">
<div class="text-only">
<div class="headline {% if pimcore_image("teaserInterstitialSmallImage") and pimcore_link('productLink') is empty %} text-center {% endif %}">
{{ pimcore_wysiwyg("teaserInterstitialHeadline", {'placeholder': 'Headline'})|trademark }}
</div>
</div>
</div>
{% if pimcore_image("teaserInterstitialSmallImage") is not empty %}
<div class="image-container">
<div class="image-absolute">
<div class="flex-column box-align-center">
{{ pimcore_image("teaserInterstitialSmallImage", {
"title": "Drag your image here",
"thumbnail": "teaserInterstitialSmallImage" ~ bundleName,
"reload": true
}) }}
</div>
</div>
</div>
{% endif %}
{% if pimcore_link("productLink") is not empty %}
<div class="button-container text-only">
{% if productLink == true %}
<a class="button btn-default btn-pull-right" href="{{ detailViewUri }}" target="{{ pimcore_link("productLink").getTarget() }}">{{ 'Zum Produkt' |trans }}</a>
{% else %}
{{ pimcore_link('productLink', {'class': "button btn-default"}) }}
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>