custom/static-plugins/NdTheme/src/Resources/views/storefront/utilities/offcanvas.html.twig line 1

Open in your IDE?
  1. {% set isAjaxOffcanvas = false %}
  2. {% block utilities_offcanvas_meta %}
  3.     {# only including this for robots to have appropriate meta tags and when offcanvas is loaded via ajax #}
  4.     {% if not app.request.xmlHttpRequest and isAjaxOffcanvas %}
  5.         {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
  6.     {% endif %}
  7. {% endblock %}
  8. {% block utilities_offcanvas %}
  9.     {# @deprecated tag:v6.5.0 - Bootstrap v5 adds `.offcanvas-header` wrapper #}
  10.     {% if feature('v6.5.0.0') %}
  11.         {% block utilities_offcanvas_header %}
  12.             <div class="offcanvas-header p-0">
  13.                 {% block utilities_offcanvas_close %}
  14.                     {# @deprecated tag:v6.5.0 - Bootstrap v5 will not require classes `.btn-block .sticky-top`. Only `.offcanvas-body` will be scrollable #}
  15.                     <button class="offcanvas-close js-offcanvas-close w-full px-8 py-4 flex justify-end">
  16.                         {% block utilities_offcanvas_close_icon %}
  17.                             {% sw_icon 'x' style { 'size': '18' } %}
  18.                         {% endblock %}
  19.                     </button>
  20.                 {% endblock %}
  21.             </div>
  22.         {% endblock %}
  23.     {% else %}
  24.         {{ block('utilities_offcanvas_close') }}
  25.     {% endif %}
  26.     {% block offcanvas_search %}
  27.         <div class="header-search w-full m-0 text-grey-200 max-w-full">
  28.             <form action="{{ path('frontend.search.page') }}"
  29.                   method="get"
  30.                   data-search-form="true"
  31.                   data-url="{{ path('frontend.search.suggest') }}?search="
  32.                   class="header-search-form relative border-0">
  33.                 {% block layout_header_search_input_group %}
  34.                     <div class="input-group w-full">
  35.                         {% block layout_header_search_input %}
  36.                             <input type="search"
  37.                                    name="search"
  38.                                    class="form-control header-search-input w-full !px-3 !pr-6 !py-2 !border !border-grey-700 !text-sm !bg-grey-600 focus:!bg-white !placeholder-gray-200 !transition !rounded-sm !duration-500 focus:!placeholder-black md:!w-[240px] !shadow-header"
  39.                                    autocomplete="off"
  40.                                    autocapitalize="off"
  41.                                    placeholder="{{ "header.searchPlaceholder"|trans|striptags }}"
  42.                                    aria-label="{{ "header.searchPlaceholder"|trans|striptags }}"
  43.                                    value="{{ page.searchTerm }}"
  44.                             >
  45.                         {% endblock %}
  46.                         <button class="btn-toggle header-actions-btn p-0 shrink-0 absolute flex align-center justify-center right-4 top-2"
  47.                                 type="submit"
  48.                                 aria-label="{{ "header.searchButton"|trans|striptags }}">
  49.                             {% sw_icon 'search' style{'pack': 'theme-icons'} %}
  50.                         </button>
  51.                     </div>
  52.                 {% endblock %}
  53.             </form>
  54.         </div>
  55.     {% endblock %}
  56.     {% block utilities_offcanvas_content_container %}
  57.         {# @deprecated tag:v6.5.0 - Bootstrap v5 will use class `.offcanvas-body` to wrap the offcanvas content #}
  58.         <div class="{% if feature('v6.5.0.0') %}offcanvas-body{% else %}offcanvas-content-container{% endif %}">
  59.             {% block utilities_offcanvas_content %}{% endblock %}
  60.         </div>
  61.     {% endblock %}
  62.     {# Custom footer by nodots #}
  63.     {% block utilities_offcanvas_footer_container %}
  64.         <div class="offcanvas-content-footer sticky bottom-0 left-0">
  65.             {% block utilities_offcanvas_footer %}{% endblock %}
  66.         </div>
  67.     {% endblock %}
  68. {% endblock %}