templates/includes/blocks/single_spacer.html.twig line 1

  1. {% set propertyName = propertyName|default('blocks') %}
    {% set spacerID = random() %}
    
    <div class="container">
        <div id="spacer-{{ spacerID }}"
             class="spacer d-flex flex-column align-items-center justify-content-center px-0 px-lg-5
             {% if block.preset is defined and block.preset != "custom" %}
             spacer-{{ block.preset }}
             {% endif %}
             ">
        </div>
    </div>
    {% if block.preset is defined and block.preset == "custom" %}
        <style>
            {% if block.height is defined %}
                #spacer-{{ spacerID }} {
                    height: {{ block.height|trim('.')|default('150px') }}{{ ("px" not in block.height) ? "px" : "" }} !important;
                }
            {% endif %}
            {% if block.height_mobile is defined %}
                @media (max-width: 424px) {
                    #spacer-{{ spacerID }} {
                        height: {{ block.height_mobile|trim('.')|default('150px') }}{{ ("px" not in block.height_mobile) ? "px" : "" }} !important;
                    }
                }
            {% endif %}
        </style>
    {% endif %}