vendor/shopware/storefront/Resources/views/storefront/base.html.twig line 18

Open in your IDE?
  1. {# Set variable to "true" to enable HMR (hot page reloading) mode #}
  2. {% set isHMRMode = app.request.headers.get('hot-reload-mode') %}
  3. {% block base_doctype %}
  4. <!DOCTYPE html>
  5. {% endblock %}
  6. {% block base_html %}
  7. <html lang="{{ app.request.locale }}"
  8.       itemscope="itemscope"
  9.       itemtype="https://schema.org/WebPage">
  10. {% endblock %}
  11. {% block base_head %}
  12.     {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
  13. {% endblock %}
  14. {% block base_body %}
  15.     <body class="{% block base_body_classes %}is-ctl-{{ controllerName|lower }} is-act-{{ controllerAction|lower }}{% endblock %}">
  16.     {% block base_body_inner %}
  17.         {% block base_noscript %}
  18.             <noscript class="noscript-main">
  19.                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  20.                     type: 'info',
  21.                     content: 'general.noscriptNotice'|trans|sw_sanitize
  22.                 } %}
  23.             </noscript>
  24.         {% endblock %}
  25.         {% block base_header %}
  26.             <header class="header-main">
  27.                 {% block base_header_inner %}
  28.                     <div class="container">
  29.                         {% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
  30.                     </div>
  31.                 {% endblock %}
  32.             </header>
  33.         {% endblock %}
  34.         {% block base_navigation %}
  35.             <div class="nav-main">
  36.                 {% block base_navigation_inner %}
  37.                     {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  38.                 {% endblock %}
  39.             </div>
  40.         {% endblock %}
  41.         {% block base_offcanvas_navigation %}
  42.             {% if page.header.navigation %}
  43.                 <div class="d-none js-navigation-offcanvas-initial-content">
  44.                     {% block base_offcanvas_navigation_inner %}
  45.                         {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/navigation.html.twig' with { navigation: page.header.navigation } %}
  46.                     {% endblock %}
  47.                 </div>
  48.             {% endif %}
  49.         {% endblock %}
  50.         {% block base_main %}
  51.             <main class="content-main">
  52.                 {% block base_flashbags %}
  53.                     <div class="flashbags container">
  54.                         {% for type, messages in app.flashes %}
  55.                             {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: type, list: messages } %}
  56.                         {% endfor %}
  57.                     </div>
  58.                 {% endblock %}
  59.                 {% block base_main_inner %}
  60.                     <div class="container">
  61.                         {% block base_main_container %}
  62.                             <div class="container-main">
  63.                                 {% block base_breadcrumb %}
  64.                                     {% if breadcrumbList %}
  65.                                         {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' %}
  66.                                     {% endif %}
  67.                                 {% endblock %}
  68.                                 {% block base_content %}{% endblock %}
  69.                             </div>
  70.                         {% endblock %}
  71.                     </div>
  72.                 {% endblock %}
  73.             </main>
  74.         {% endblock %}
  75.         {% block base_footer %}
  76.             <footer class="footer-main">
  77.                 {% block base_footer_inner %}
  78.                     <div class="container">
  79.                         {% sw_include '@Storefront/storefront/layout/footer/footer.html.twig' %}
  80.                     </div>
  81.                 {% endblock %}
  82.             </footer>
  83.         {% endblock %}
  84.     {% endblock %}
  85.     {% block base_scroll_up %}
  86.         {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
  87.     {% endblock %}
  88.     {% block base_cookie_permission %}
  89.         {% sw_include '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %}
  90.     {% endblock %}
  91.     {% block base_pseudo_modal %}
  92.         {% sw_include '@Storefront/storefront/component/pseudo-modal.html.twig' %}
  93.     {% endblock %}
  94.     {% block base_body_script %}
  95.         {% block base_script_token %}
  96.             <script>
  97.                 {# @deprecated tag:v6.3.0 accessKey and contextToken will be removed #}
  98.                 window.accessKey = '';
  99.                 window.contextToken = '';
  100.                 window.apiAccessUrl = "{{ url('frontend.api-access') }}";
  101.             </script>
  102.         {% endblock %}
  103.         {% block base_script_router %}
  104.             {# Register all routes that will be needed in JavaScript to the window.router object #}
  105.             <script>
  106.                 window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  107.                 window.router = {
  108.                     'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  109.                     'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  110.                     'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  111.                     'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  112.                     'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  113.                     'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  114.                     'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  115.                     'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  116.                     'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  117.                     'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  118.                 };
  119.             </script>
  120.         {% endblock %}
  121.         {% block base_script_breakpoints %}
  122.             {# Register the available viewport breakpoints the window.breakpoints object #}
  123.             <script>
  124.                 window.breakpoints = {{ shopware.theme.breakpoint|json_encode()|raw }};
  125.             </script>
  126.         {% endblock %}
  127.         {% block base_script_csrf %}
  128.             <script>
  129.                 window.csrf = {
  130.                     'enabled': '{{ shopware.csrfEnabled }}',
  131.                     'mode': '{{ shopware.csrfMode }}'
  132.                 }
  133.             </script>
  134.         {% endblock %}
  135.         {% block base_script_hmr_mode %}
  136.             {% if isHMRMode %}
  137.                 {% set baseUrl = app.request.getScheme() ~ '://' ~ app.request.getHost() %}
  138.                 <script type="text/javascript" src="{{ baseUrl }}:9999/js/vendor-node.js"></script>
  139.                 <script type="text/javascript" src="{{ baseUrl }}:9999/js/vendor-shared.js"></script>
  140.                 <script type="text/javascript" src="{{ baseUrl }}:9999/js/runtime.js"></script>
  141.                 <script type="text/javascript" src="{{ baseUrl }}:9999/js/app.js"></script>
  142.                 {# The storefront entry is a combined entry point which contains all plugins & themes #}
  143.                 <script type="text/javascript" src="{{ baseUrl }}:9999/js/storefront.js"></script>
  144.             {% else %}
  145.                 {% for file in shopware.theme.assets.js %}
  146.                     <script type="text/javascript" src="{{ asset(file) }}" async></script>
  147.                 {% endfor %}
  148.             {% endif %}
  149.         {% endblock %}
  150.     {% endblock %}
  151.     </body>
  152. {% endblock %}
  153. </html>