custom/plugins/EmovaWbTheme/src/Resources/views/storefront/section/cms-section-block-container.html.twig line 1

Open in your IDE?
  1. {% block section_content_block %}
  2.     {% set top = block.marginTop ? block.marginTop : 0 %}
  3.     {% set right = block.marginRight ? block.marginRight : 0 %}
  4.     {% set bottom = block.marginBottom ? block.marginBottom : 0 %}
  5.     {% set left = block.marginLeft ? block.marginLeft : 0 %}
  6.     {% if top or right or bottom or left %}
  7.         {% set padding = top ~ " " ~ right ~ " " ~ bottom ~ " " ~ left %}
  8.     {% endif %}
  9.     {% set blockBgColor = block.backgroundColor %}
  10.     {% set blockClasses = [block.cssClass, 'pos-' ~ block.position, 'cms-block-' ~ block.type] %}
  11.     {% if block.backgroundMedia %}
  12.         {% set blockClasses = ['bg-image']|merge(blockClasses) %}
  13.     {% endif %}
  14.     {% if blockBgColor %}
  15.         {% set blockClasses = ['bg-color']|merge(blockClasses) %}
  16.     {% endif %}
  17.     {% set columns = 3 %}
  18.     {% set isInSidebar = block.sectionPosition == 'sidebar' %}
  19.     {% set sidebarClasses = '' %}
  20.     {% if isInSidebar == true %}
  21.         {% set sidebarClasses = 'has--sidebar' %}
  22.     {% endif %}
  23.     <div class="cms-block {{ blockClasses|join(' ') }}"
  24.          {# style="background: linear-gradient(to right, rgb(255, 153, 51) 0%, rgb(255, 51, 204) 100%, black 100%, black 100%);; #}
  25.          {% if blockBgColor %}style="background-color: {{ blockBgColor }};"{% endif %}>
  26.         {% block section_content_block_background_image %}
  27.             {% if block.backgroundMedia %}
  28.                 {% sw_thumbnails 'cms-block-background' with {
  29.                     media: block.backgroundMedia,
  30.                     attributes: {
  31.                         class: "cms-block-background media-mode--" ~ block.backgroundMediaMode
  32.                     }
  33.                     } %}
  34.             {% endif %}
  35.         {% endblock %}
  36.         {% block section_content_block_container %}
  37.             <div class="cms-block-container" >
  38.                  {# style="{% if padding %}padding: {{ padding }};{% endif %}"> #}
  39.                 {% block section_content_block_row %}
  40.                     <div class="cms-block-container-row row cms-row {{ sidebarClasses }}">
  41.                         {% sw_include "@Storefront/storefront/block/cms-block-" ~ block.type ~ ".html.twig" ignore missing %}
  42.                     </div>
  43.                 {% endblock %}
  44.             </div>
  45.         {% endblock %}
  46.     </div>
  47. {% endblock %}