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

  1. {% set propertyName = propertyName|default('blocks') %}
  2. {% set spacerID = random() %}
  3. <div class="container">
  4.     <div id="spacer-{{ spacerID }}"
  5.          class="spacer d-flex flex-column align-items-center justify-content-center px-0 px-lg-5
  6.          {% if block.preset is defined and block.preset != "custom" %}
  7.          spacer-{{ block.preset }}
  8.          {% endif %}
  9.          ">
  10.     </div>
  11. </div>
  12. {% if block.preset is defined and block.preset == "custom" %}
  13.     <style>
  14.         {% if block.height is defined %}
  15.             #spacer-{{ spacerID }} {
  16.                 height: {{ block.height|trim('.')|default('150px') }}{{ ("px" not in block.height) ? "px" : "" }} !important;
  17.             }
  18.         {% endif %}
  19.         {% if block.height_mobile is defined %}
  20.             @media (max-width: 424px) {
  21.                 #spacer-{{ spacerID }} {
  22.                     height: {{ block.height_mobile|trim('.')|default('150px') }}{{ ("px" not in block.height_mobile) ? "px" : "" }} !important;
  23.                 }
  24.             }
  25.         {% endif %}
  26.     </style>
  27. {% endif %}