{% set sliderBlockName = 'slideblockname' %}<section class="section-banner {{ sliderBlockName }} p-0 {% if not editmode %}{% endif %} position-relative" data-aos="zoom-out"> {% if editmode %} <div class="container"> <div class="row"> <div class="col-12"> <div class="alert alert-primary d-flex align-items-center"> {{ 'Afbeelding of video?'|trans({}, 'admin') }} {{ pimcore_select("media", { "store": [ ["image", "Image"], ["video", "Video"], ], "defaultValue" : "image", "reload" : true, "class": "ms-3" }) }} </div> </div> </div> </div> <div class="container mb-5"> <div class="row"> <div class="col-12"> {% if pimcore_select("media").getData() == "image" %} {% set message = 'Slideshow: druk op + om een slide toe te voegen' %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {% set block = pimcore_block(sliderBlockName, {'reload' : true, 'limit' : 6}) %} {% for blockcontent in block.iterator %} <div class="border border-primary p-3 mb-3"> <div class="form-group mb-2"> {% set message = 'Afbeelding ' ~ loop.index %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {{ pimcore_image("slideshowImage", { "title" : "Drag your image here", "width" : 200, "height" : 200, }) }} </div> {# <div class="form-group mb-2"> {% set message = 'Titel' %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {{ pimcore_input("titel", { "class": "form-control", "placeholder" : "Titel"|trans({}, 'admin') }) }} {{ pimcore_textarea("titel",{ "nl2br": true, "height": 300, "placeholder": "Titel"|trans({}, 'admin') }) }} </div>#} <div class="form-group mb-2"> {% set message = 'Tekst' %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {{ pimcore_textarea("slidertext", { "class": "form-control", "placeholder" : "Tekst slider"|trans({}, 'admin'), "nl2br": true }) }} </div> <div class="form-group mb-2"> {% set message = 'WYSIWYG' %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {{ pimcore_wysiwyg("sliderwysiwyg", { "class": "form-control" }) }} </div> <div class="form-group mb-2"> {% set message = 'Klik op knop (potlood) om de link in te stellen' %} {% include 'includes/basicBlocks/admin/message/tip.html.twig' with {'message': message, 'type' : 'info'} %} {{ pimcore_link("bannerLink") }} </div> </div> {% endfor %} {% endif %} {% if pimcore_select("media").getData() == "video" %} {% if pimcore_select("media").getData() == "video" %} {{ 'Video'|trans({}, 'admin') }} {{ pimcore_video('bannerVideo', { width: 200, height: 150 }) }} {% endif %} {% endif %} </div> </div> </div> {% endif %} {% if not editmode %} <div class="section-banner {{ sliderBlockName }} p-0"> {% if pimcore_select("media").getData() == "image" %} <div id="{{ sliderBlockName }}" class="carousel slide carousel-home" data-bs-ride="carousel"> {% set amount = pimcore_block(sliderBlockName).getCount() - 1 %} {% if amount > 0 %} <ol class="carousel-indicators"> {% for i in 0..amount %} <li data-bs-target="#{{ sliderBlockName }}" data-bs-slide-to="{{ i }}" class={% if i == 0 %} "active" aria-current="true" {% endif %}></li> {% endfor %} </ol> {% endif %} <div class="carousel-inner"> {% set blocks = pimcore_block(sliderBlockName, {'limit' : 6}) %} {% for block in blocks.iterator %} {% set current = blocks.getCurrent() %} {% set link = pimcore_link("bannerLink").getHref() %} {% if link is defined %} {% set target = pimcore_link("bannerLink").getTarget() %} {% set linktext = pimcore_link("bannerLink").getText() %} {% endif %} <div class="carousel-item {% if current == 0 %}active{% endif %}" id="slide-{{ current }}"> <div class="image position-relative" data-thumbnail="{{ pimcore_image('slideshowImage').getThumbnail('slideshow-homepage') }}" style="background-image: url({{ pimcore_image('slideshowImage').getThumbnail('slideshow-homepage') }});"> <div class="container position-relative h-75"> <div class="row align-items-center h-100"> <div class="col-6 text-white py-5"> {# {{ pimcore_input("titel") }} #} {% if not pimcore_textarea("slidertext").isEmpty() %} <h1 class="mb-5 text-white display-1 fw-bold" style="text-shadow: 2px 2px 8px rgba(0,0,0,0.6);">{{ pimcore_textarea("slidertext") }}</h1> {% endif %} {% if not pimcore_wysiwyg("sliderwysiwyg").isEmpty() %} <h1 class="mb-5 text-white display-1 fw-bold">{{ pimcore_wysiwyg("sliderwysiwyg") }}</h1> {% endif %} {% if link is defined and not pimcore_link("bannerLink").isEmpty() %} <a href="{{ link }}" target="{{ target }}" class="btn btn-secondary">{{ linktext }}</a> {% endif %} </div> </div> </div> </div> </div> {% endfor %} </div> {% if amount > 0 %} <a class="carousel-control-prev" type="button" data-bs-target="#{{ sliderBlockName }}" role="button" data-bs-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="visually-hidden">{{ 'Previous'|trans }}</span> </a> <a class="carousel-control-next" type="button" data-bs-target="#{{ sliderBlockName }}" role="button" data-bs-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="visually-hidden">{{ 'Next'|trans }}</span> </a> {% endif %} </div> {% endif %} {% if pimcore_select("media").getData() == "video" %} <div class="header-media"> {{ pimcore_video('bannerVideo', { attributes: { 'preload': 'auto', 'controls': '', 'autoplay' : '', 'playsinline': '', 'muted' : '', 'loop': 'loop', 'width': '100%', 'height': '100%' } }) }} </div> {% endif %} </div> {% endif %} <svg version="1.1" class="{% if not editmode %}position-absolute bottom-0 start-0 mb-n5{% endif %}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 3869.3 565.1" style="enable-background:new 0 0 3869.3 565.1;" xml:space="preserve"> <style type="text/css"> .st0 { fill: #FFFFFF; } </style> <path class="st0" d="M1652.2,98.8c495,191.1,690.4,185.6,946.4,176.8c256-8.8,642-103.8,1270.7,181.3l-1.5,108.1H0L5.7,148 c52.8,15.7,213.9,31.6,435.6-30.9C718.3,38.9,1157.3-92.3,1652.2,98.8z"/> </svg></section>