custom/plugins/NeonPlatformUnitarticles/src/Resources/views/storefront/utilities/icon.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/utilities/icon.html.twig' %}
  2. {% block utilities_icon %}
  3.     {% set styles = [ size, color, rotation, flip, class ] %}
  4.     {%- if pack is not defined -%}
  5.         {% set pack = 'default' %}
  6.     {%- endif -%}
  7.     {%- if namespace is not defined -%}
  8.         {% set namespace = 'Storefront' %}
  9.     {%- endif -%}
  10.     {%- if themeIconConfig[pack] is defined -%}
  11.         <span {% if cssColor != "" %}style="color: {{cssColor}}"{% endif %} class="icon icon-{{ pack }} icon-{{ pack }}-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  12.             {% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
  13.             {% if not icon %}
  14.                 {# Up to SW 6.4.15.1 #}
  15.                 {% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/../' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
  16.             {% endif %}
  17.             {{ icon|sw_icon_cache|raw }}
  18.         </span>
  19.     {%- else -%}
  20.         <span {% if cssColor != "" %}style="color: {{cssColor}}"{% endif %} class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  21.             {% set icon = source('@' ~ namespace ~ '/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  22.             {% if not icon %}
  23.                 {# Up to SW 6.4.15.1 #}
  24.                 {% set icon = source('@' ~ namespace ~ '/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  25.             {% endif %}
  26.             {{ icon|sw_icon_cache|raw }}
  27.         </span>
  28.     {%- endif -%}
  29. {% endblock %}