custom/plugins/NetzpPowerPack6/src/Resources/views/storefront/partials/responsive.html.twig line 1

Open in your IDE?
  1. {% block netzp_pp_responsive_wrapper %}
  2.     {% set responsiveClasses = [] %}
  3.     {% set styles = [] %}
  4.     {% if model and model.customFields and model.customFields.netzp_pp %}
  5.         {% set responsiveClasses = responsiveClasses|merge(model.customFields.netzp_pp.xs ? ['d-block'] : ['d-none']) %}
  6.         {% set responsiveClasses = responsiveClasses|merge(model.customFields.netzp_pp.sm ? ['d-sm-block'] : ['d-sm-none']) %}
  7.         {% set responsiveClasses = responsiveClasses|merge(model.customFields.netzp_pp.md ? ['d-md-block'] : ['d-md-none']) %}
  8.         {% set responsiveClasses = responsiveClasses|merge(model.customFields.netzp_pp.lg ? ['d-lg-block'] : ['d-lg-none']) %}
  9.         {% set responsiveClasses = responsiveClasses|merge(model.customFields.netzp_pp.xl ? ['d-xl-block'] : ['d-xl-none']) %}
  10.         {% set color1 = model.customFields.netzp_pp.color1 %}
  11.         {% set color2 = model.customFields.netzp_pp.color2 %}
  12.         {% set colorAngle = model.customFields.netzp_pp.colorAngle %}
  13.         {% if color1 != "" and color2 != "" %}
  14.             {% set styleColorGradient = 'background-image: linear-gradient(' ~ colorAngle ~ 'deg, ' ~ color1 ~ ', ' ~ color2 ~ ')' %}
  15.             {% set styles = styles|merge([styleColorGradient]) %}
  16.         {% endif %}
  17.         <div class="{{ responsiveClasses|join(' ') }}" style="{{ styles|join('; ') }}">
  18.             {{ parentBlock|raw }}
  19.         </div>
  20.     {% else %}
  21.         {{ parentBlock|raw }}
  22.     {% endif %}
  23. {% endblock %}