vendor/shopware/storefront/Resources/views/storefront/utilities/icon.html.twig line 1

Open in your IDE?
  1. {% block utilities_icon %}
  2.     {% set styles = [ size, color, rotation, flip, class ] %}
  3.     {% if pack is not defined %}
  4.         {% set pack = 'default' %}
  5.     {% endif %}
  6.     {% if namespace is not defined %}
  7.         {% set namespace = 'Storefront' %}
  8.     {% endif %}
  9.     {% if themeIconConfig[pack] is defined %}
  10.         <span class="icon icon-{{ pack }} icon-{{ pack }}-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  11.             {{ source('@' ~ themeIconConfig[pack].namespace ~ '/../' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) }}
  12.         </span>
  13.     {% else %}
  14.         <span
  15.             class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  16.                 {{ source('@' ~ namespace ~ '/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) }}
  17.         </span>
  18.     {% endif %}
  19. {% endblock %}