templates/bundles/SyliusShopBundle/layout.html.twig line 93

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale|slice(0, 2) }}">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     {% block seo_title %}
  7.         {{ sylius_template_event('dedi_sylius_seo_plugin.title', { resource: product ?? taxon ?? vendor ?? page ?? sylius.channel }) }}
  8.     {% endblock %}
  9.     <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  10.     <link rel="preconnect" href="https://fonts.googleapis.com">
  11.     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  12.     <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png?v=1.0.0">
  13.     <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png?v=1.0.0">
  14.     <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png?v=1.0.0">
  15.     <link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png?v=1.0.0">
  16.     <link rel="icon" type="image/svg+xml" href="/favicon/favicon.svg?v=1.0.0">
  17.     <link rel="mask-icon" href="/favicon/safari-pinned-tab.svg?v=1.0.0" color="#5bbad5">
  18.     <link rel="shortcut icon" href="/favicon/favicon.ico?v=1.0.0">
  19.     <meta name="theme-color" content="#ffffff">
  20.     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
  21.     {% include '@SyliusShop/_links.html.twig' %}
  22.     {% include '@SyliusShop/_clarity.html.twig' %}
  23.     {% block seo_metatags %}
  24.         {{ sylius_template_event('dedi_sylius_seo_plugin.metatags', { resource: product ?? taxon ?? vendor ?? page ?? sylius.channel }) }}
  25.         {{ sylius_template_event('dedi_sylius_seo_plugin.rich_snippets') }}
  26.         {% if is_noindex_path(app.request.pathinfo, app.request.query.all) %}
  27.             <meta name="robots" content="noindex, nofollow">
  28.         {% endif %}
  29.         {% set resourceToUse = taxon is defined ? taxon : (vendor is defined ? vendor : (page is defined ? page : null)) %}
  30.         {% if resourceToUse is not null %}
  31.             <script type="application/ld+json">
  32.               {{ generate_schema_markup(resourceToUse) | json_encode(constant('JSON_PRETTY_PRINT')) | replace({'\\/':'/'}) | raw }}
  33.             </script>
  34.         {% endif %}
  35.     {% endblock %}
  36.     {% block stylesheets %}
  37.         {{ sylius_template_event('sylius.shop.layout.stylesheets') }}
  38.         <style>
  39.             .tw.flag {
  40.                 visibility: hidden !important;
  41.             }
  42.         </style>
  43.     {% endblock %}
  44.     {{ sylius_template_event('sylius.shop.layout.head') }}
  45. </head>
  46. <body class="pushable">
  47. {{ render_esi(path('ch_cookie_consent.show_if_cookie_consent_not_set', { 'locale' : app.request.locale })) }}
  48. {{ sylius_template_event('sylius.shop.layout.before_body') }}
  49. {% block messages %}
  50.     <div class="hyf-messages"></div>
  51. {% endblock %}
  52. {% block sidebar %}
  53.     <div class="ui right wide sidebar vertical menu overlay mobile-sidebar">
  54.         {{ sylius_template_event('sylius.shop.layout.sidebar') }}
  55.     </div>
  56. {% endblock %}
  57. {% block accountSidebar %}
  58.     {% if app.user != null %}
  59.         <div class="ui left wide sidebar vertical menu overlay mobile-account-sidebar">
  60.             {% include 'Context/Vendor/Menu/_mobileMenu.html.twig' %}
  61.         </div>
  62.     {% endif %}
  63. {% endblock %}
  64. <div class="pusher" data-route="{{ app.request.get('_route') }}">
  65.     {% block top %}
  66.         <div id="menu" class="top-menu bg-white">
  67.             <div class="ui container">
  68.                 <div class="top-bar">
  69.                     {% include "@SyliusShop/Layout/Header/_logo.html.twig" %}
  70.                     {{ sylius_template_event('sylius.shop.layout.topbar') }}
  71.                 </div>
  72.             </div>
  73.         </div>
  74.     {% endblock %}
  75.     {% block header %}
  76.         <div id="menu-categories" class="bg-topaz-100">
  77.             <div class="ui container">
  78.                 {% include '@SyliusShop/Layout/Header/_menu.html.twig' %}
  79.             </div>
  80.         </div>
  81.     {% endblock %}
  82.     {# AI Search Bar - static in introduction on homepage, floating on all other pages #}
  83.     {% set currentRoute = app.request.get('_route') %}
  84.     {% set isHomepage = currentRoute == 'sylius_shop_homepage' %}
  85.     {% set isBot = app.request.attributes.get('is_bot', false) %}
  86.     {% set hideFloatingSearch =
  87.         '/account/' in app.request.pathInfo or
  88.         currentRoute starts with 'bitbag_sylius_organization_plugin_shop_account_' or
  89.         currentRoute starts with 'sylius_shop_account_' or
  90.         currentRoute starts with 'sylius_shop_cart_' or
  91.         currentRoute starts with 'sylius_shop_checkout_' or
  92.         currentRoute starts with 'sylius_shop_order_' or
  93.         currentRoute == 'app_crfq_create' %}
  94.     {% if isHomepage %}
  95.         {% include '@SyliusShop/Homepage/introduction.html.twig' %}
  96.             <div class="ui hidden divider"></div>
  97.     {% endif %}
  98.     {% if not is_mobile() %}
  99.         <div class="ui hidden divider"></div>
  100.     {% endif %}
  101.     <div class="ui container">
  102.         {% include '@SyliusShop/_flashes.html.twig' %}
  103.         {{ sylius_template_event('sylius.shop.layout.before_content') }}
  104.         {% block content %}
  105.         {% endblock %}
  106.         {{ sylius_template_event('sylius.shop.layout.after_content') }}
  107.     </div>
  108.     {% if not isHomepage and not isBot and not hideFloatingSearch %}
  109.         {% include '@SyliusShop/Homepage/_aiSearch.html.twig' with {'floating': true} %}
  110.     {% endif %}
  111.     {% block footer %}
  112.         {% include '@SyliusShop/_footer.html.twig' %}
  113.     {% endblock %}
  114. </div>
  115. {% block javascripts %}
  116.     {{ sylius_template_event('sylius.shop.layout.javascripts') }}
  117.     <script>
  118.         // Make compare variables globally available for webpack bundled scripts
  119.         window.addToCompareSuccessTitle = '{{ 'sylius.ui.success'|trans }}';
  120.         window.addToCompareSuccess = '{{ 'app.product_compare.added'|trans }}';
  121.         window.addToCompareErrorTitle = '{{ 'sylius.ui.error'|trans }}';
  122.         window.addToCompareError = '{{ 'app.product_compare.fail'|trans }}';
  123.         window.visitComparisonPage = '{{ 'app.ui.visit_comparison_page'|trans }}';
  124.         window.browseCompare = '{{ 'app.ui.product.card.in_comparison'|trans }}';
  125.         window.comparisonPageUrl = '{{ path('app_shop_product_compare_show') }}';
  126.         window.addToCompareUrl = '{{ path('app_shop_product_compare_add_to_compare', {'productId': '{id}'}) }}';
  127.         window.checkSvgPath = '{{ asset('build/shop/images/check.svg', 'shop') }}';
  128.         // Wishlist global variables
  129.         window.addToListErrorTitle = '{{ 'sylius.ui.error'|trans }}';
  130.         window.addToListError = '{{ 'app.ui.failed_to_add_to_list'|trans }}';
  131.         window.inList = '{{ 'sylius.ui.added_to_list'|trans }}';
  132.         window.listPageUrl = '{{ path('bitbag_sylius_wishlist_plugin_shop_locale_wishlist_list_products') }}';
  133.         // Password validation translations
  134.         window.translations = window.translations || {};
  135.         window.translations.passwordsMustMatch = "{{ 'app.ui.form.passwords_must_match'|trans|e('js') }}";
  136.         window.translations.passwordStrength = {
  137.             enterPass: "{{ 'app.ui.form.password_strength.enter_pass'|trans|e('js') }}",
  138.             shortPass: "{{ 'app.ui.form.password_strength.short_pass'|trans|e('js') }}",
  139.             containsField: "{{ 'app.ui.form.password_strength.contains_field'|trans|e('js') }}",
  140.             reallyInsecure: "{{ 'app.ui.form.password_strength.really_insecure'|trans|e('js') }}",
  141.             weak: "{{ 'app.ui.form.password_strength.weak'|trans|e('js') }}",
  142.             medium: "{{ 'app.ui.form.password_strength.medium'|trans|e('js') }}",
  143.             strong: "{{ 'app.ui.form.password_strength.strong'|trans|e('js') }}"
  144.         };
  145.     </script>
  146.     {# Initialize tooltips globally #}
  147.     <script>
  148.         $(document).ready(function () {
  149.             $("[data-content],[data-html]").each(function () {
  150.                 var position = $(this).attr("data-position") || "bottom center";
  151.                 var opts = {hoverable: true, position: position};
  152.                 if ($(this).hasClass('custom-tooltip')) {
  153.                     opts.className = { popup: 'ui popup custom-tooltip-popup' };
  154.                 }
  155.                 $(this).popup(opts);
  156.             });
  157.         });
  158.     </script>
  159. {% endblock %}
  160. {% block confirmationModal %}
  161.     {% include '@SyliusUi/Modal/_confirmation.html.twig' %}
  162. {% endblock %}
  163. {{ sylius_template_event('sylius.shop.layout.after_body') }}
  164. </body>
  165. </html>