custom/static-plugins/theme-base/src/Resources/views/storefront/component/widgets/wexo-widget.html.twig line 1

Open in your IDE?
  1. {% block wexo_widget %}
  2.     {% if module != null and module != "text" %}
  3.         <div class="d-flex align-items-center p-2 wexo-widget">
  4.             {% if module is same as ("currency") %}
  5.                 {% block wexo_widget_currency %}
  6.                     {% embed '@Storefront/storefront/layout/header/actions/currency-widget.html.twig' with{position: "wexo-widget"} %}
  7.                         {% block layout_header_actions_currency_widget_form %}
  8.                             {% if icon %}
  9.                                 <img src="{{ icon|sw_sanitize }}" alt="icon for currency" width="16px" height="16px">
  10.                             {% endif %}
  11.                             {{ parent() }}
  12.                         {% endblock %}
  13.                     {% endembed %}
  14.                 {% endblock %}
  15.             {% elseif module is same as ("account") %}
  16.                 {% block wexo_widget_account %}
  17.                     {% sw_include '@Storefront/storefront/layout/header/actions/account-widget.html.twig' %}
  18.                 {% endblock %}
  19.             {% elseif module is same as ("language") %}
  20.                 {% block wexo_widget_language %}
  21.                     {% sw_include '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  22.                 {% endblock %}
  23.             {% elseif module is same as ("cart") %}
  24.                 {% block wexo_widget_cart %}
  25.                     <div class="header-cart"
  26.                          data-offcanvas-cart="true">
  27.                         <a class="btn header-cart-btn header-actions-btn"
  28.                            href="{{ path('frontend.checkout.cart.page') }}"
  29.                            data-cart-widget="true"
  30.                            title="{{ 'checkout.cartTitle'|trans|striptags }}"
  31.                            aria-label="{{ 'checkout.cartTitle'|trans|striptags }}">
  32.                             {% sw_include '@Wtheme/storefront/layout/header/actions/cart-widget.html.twig' %}
  33.                         </a>
  34.                     </div>
  35.                 {% endblock %}
  36.             {% elseif module is same as ("service") %}
  37.                 {% block wexo_widget_service %}
  38.                     {% sw_include '@Storefront/storefront/layout/header/actions/service-menu-widget.html.twig' %}
  39.                 {% endblock %}
  40.             {% elseif module is same as ("custom") %}
  41.                 {% sw_include '@Wtheme/storefront/component/widgets/custom.html.twig' with {i:i, icon:icon, text:text} %}
  42.             {% elseif module is same as ("customWidget") %}
  43.                 {% sw_include '@Wtheme/storefront/component/widgets/custom-widget.html.twig' with {i:i, icon:icon, text:text} %}
  44.             {% endif %}
  45.         </div>
  46.     {% else %}
  47.         {% if icon or content %}
  48.             {% block wexo_widget_text %}
  49.                 <div class="d-flex align-items-center p-2 wexo-widget">
  50.                     {% if icon %}
  51.                         <img src="{{ icon|sw_sanitize }}" alt="Image visually summarizing text on the right" width="16px" height="16px">
  52.                     {% endif %}
  53.                     {% if content %}
  54.                         <p class="mb-0 ml-1">
  55.                             {% include '@Wtheme/storefront/reader/snippet.html.twig' with {read: content, hyperlink:true} %}
  56.                         </p>
  57.                     {% endif %}
  58.                 </div>
  59.             {% endblock %}
  60.         {% endif %}
  61.     {% endif %}
  62. {% endblock %}