<?php
   $homepageSliderBlock = $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('homepage_slider_block')->toHtml();
?>
<div class="section-slider-homepage">
    <div class="slider slider--homepage js-homepage-slider">
        <?php
            echo strip_tags($homepageSliderBlock, '<div><picture><source><img><a><button><br><strong><span><h2>');
        ?>
    </div>
</div>


<script type="text/x-magento-init">
    {
        ".js-homepage-slider": {
            "js/slider": {
                "slickSettings" : {
                    "slidesToShow": 1,
                    "slidesToScroll": 1,
                    "dots": true,
                    "responsive": [{
                      "breakpoint": 992,
                      "settings": {
                        "slidesToShow": 1
                      }
                    },
                    {
                      "breakpoint": 767,
                      "settings": {
                        "slidesToShow": 1,
                        "arrows": false
                      }
                    }]
                }
            }
        }
    }
</script>

