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

Open in your IDE?
  1. {#
  2.     @deprecated tag:v6.5.0 - Announcement:
  3.     Bootstrap v5 comes with its own OffCanvas component.
  4.     This template will be adjusted to use Bootstraps OffCanvas markup.
  5.     @see https://getbootstrap.com/docs/5.1/components/offcanvas
  6. #}
  7. {% set isAjaxOffcanvas = false %}
  8. {% block utilities_offcanvas_meta %}
  9.     {# only including this for robots to have appropriate meta tags and when offcanvas is loaded via ajax #}
  10.     {% if not app.request.xmlHttpRequest and isAjaxOffcanvas %}
  11.         {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
  12.     {% endif %}
  13. {% endblock %}
  14. {% block utilities_offcanvas %}
  15.     {# @deprecated tag:v6.5.0 - Bootstrap v5 adds `.offcanvas-header` wrapper #}
  16.     {% if feature('v6.5.0.0') %}
  17.         {% block utilities_offcanvas_header %}
  18.             <div class="offcanvas-header p-0">
  19.                 {% block utilities_offcanvas_close %}
  20.                     {# @deprecated tag:v6.5.0 - Bootstrap v5 will not require classes `.btn-block .sticky-top`. Only `.offcanvas-body` will be scrollable #}
  21.                     <button class="btn btn-light offcanvas-close js-offcanvas-close{% if not feature('v6.5.0.0') %} btn-block sticky-top{% endif %}">
  22.                         {% block utilities_offcanvas_close_icon %}
  23.                             {% sw_icon 'x' style { 'size': 'sm' } %}
  24.                         {% endblock %}
  25.                         {% block utilities_offcanvas_close_text %}
  26.                             {{ "general.offcanvasCloseMenu"|trans|sw_sanitize }}
  27.                         {% endblock %}
  28.                     </button>
  29.                 {% endblock %}
  30.             </div>
  31.         {% endblock %}
  32.     {% else %}
  33.         {{ block('utilities_offcanvas_close') }}
  34.     {% endif %}
  35.     {% block utilities_offcanvas_content_container %}
  36.         {# @deprecated tag:v6.5.0 - Bootstrap v5 will use class `.offcanvas-body` to wrap the offcanvas content #}
  37.         <div class="{% if feature('v6.5.0.0') %}offcanvas-body{% else %}offcanvas-content-container{% endif %}">
  38.             {% block utilities_offcanvas_content %}{% endblock %}
  39.         </div>
  40.     {% endblock %}
  41. {% endblock %}