custom/plugins/LogBchange/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.     {% if pack is not defined %}
  4.         {% set pack = 'default' %}
  5.     {% endif %}
  6.     {% set customIcon = source('@LogBchange/../app/storefront/src/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  7.     {% if (customIcon) %}
  8.         {% set styles = [ size, color, rotation, flip, class ] %}
  9.         <span
  10.             class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  11.             {{ customIcon|raw }}
  12.         </span>
  13.     {% else %}
  14.         {{ parent() }}
  15.     {% endif %}
  16.     
  17. {% endblock %} #}
  18. {#{% block utilities_icon %}
  19.     {% set styles = [ size, color, rotation, flip, class ] %}
  20.     {% if pack is not defined %}
  21.         {% set pack = 'default' %}
  22.     {% endif %}
  23.     {% if pack == 'MeineIcons' %}
  24.     <span
  25.         class="isax icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  26.             {{ source('@LogBchange/../app/storefront/dist/assets/icons/linear/'~ name ~'.svg', ignore_missing = false) }}
  27.        
  28.     </span>
  29.      {% else %}
  30.      <span
  31.         class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  32.             {{ source('@Storefront/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) }}
  33.              </span>
  34.         {% endif %}
  35. {% endblock %}#}
  36. {%- block utilities_icon -%}
  37.     {% set styles = [ size, color, rotation, flip, class ] %}
  38.     {%- if pack is not defined -%}
  39.         {% set pack = 'default' %}
  40.     {%- endif -%}
  41.     {%- if namespace is not defined -%}
  42.         {% set namespace = 'Storefront' %}
  43.     {%- endif -%}
  44.     {% if pack == 'MeineIcons' %}
  45.         <span class="isax icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  46.                 {{ source('@LogBchange/app/storefront/dist/assets/icons/linear/'~ name ~'.svg', ignore_missing = false) }}
  47.             </span>
  48.         {#{% if config('LogBchange.config.environment') == "prod" %}
  49.             <span class="isax icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  50.                 {{ source('@LogBchange/../app/storefront/dist/assets/icons/linear/'~ name ~'.svg', ignore_missing = false) }}
  51.             </span>
  52.         {% else %}
  53.             <span class="isax icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  54.                 {{ source('@LogBchange/app/storefront/dist/assets/icons/linear/'~ name ~'.svg', ignore_missing = false) }}
  55.             </span>
  56.         {% endif %}#}
  57.     {% else %}
  58.         <span class="icon icon-{{ name }}{% for entry in styles %}{% if entry != "" %} icon-{{ entry }}{% endif %}{% endfor %}">
  59.             {% set icon = source('@' ~ namespace ~ '/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
  60.             {{ icon|sw_icon_cache|raw }}
  61.         </span>
  62.     {%- endif -%}
  63. {%- endblock -%}