src/MyBundle/Resources/views/base.html.twig line 1

Open in your IDE?
  1. {% extends '@Core/DCSite/core-dc-template.html.twig' %}
  2.     {% block head %}
  3.         <meta name="robots" content="noindex, nofollow" />
  4.         <meta name="google-site-verification" content="RLXfK0B_OSi3MwDTNxCzrk0w3cGs63mFRM6_PNOnp6I" />
  5.         {% block css %}
  6.         {% endblock css %}
  7.         {% block myHead %}
  8.         {% endblock %}
  9.         {% if app.user %}
  10.             <script>
  11.                 window.dataLayer = window.dataLayer || [];
  12.                 window.dataLayer.push(
  13.                 {
  14.                     'event':'userId',
  15.                     'user_id':'{{app.user.id}}',
  16.                 });
  17.             </script>
  18.         {% endif %}
  19.         {% if '/profile/basket/order-info/' in app.request.requestUri and order and order.state == 2 %}
  20.             <script>
  21.                 dataLayer = [{
  22.                     'transactionId': '{{ order.id }}',
  23.                     'transactionAffiliation': '{{ order.dealer }}',
  24.                     'transactionTotal': '{{ order.price }}',
  25.                     'transactionProducts': [{
  26.                         {% for item in items %}
  27.                             'sku': '{{ order.id }}',
  28.                             'name': '{{ item.title }}',
  29.                             'category': '{{ item.modelTitle }}',
  30.                             'price': '{{ item.price }}',
  31.                             'quantity': '{{ item.count }}'
  32.                         {% endfor %}
  33.                     }]
  34.                 }];
  35.             </script>
  36.         {% endif %}
  37.         <!-- Google Tag Manager -->
  38.         <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  39.                     new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  40.                 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  41.                 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  42.             })(window,document,'script','dataLayer','GTM-5WFLZNW');</script>
  43.         <!-- End Google Tag Manager -->
  44.     {% endblock head %}
  45.     {% block body %}
  46.         <!-- Google Tag Manager (noscript) -->
  47.         <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WFLZNW"
  48.                           height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  49.         <!-- End Google Tag Manager (noscript) -->
  50.         {% block header %}
  51.         {% endblock header %}
  52.         {% block content %}
  53.         {% endblock %}
  54.         {% block footer %}
  55.         {% endblock footer %}
  56.     {% endblock body %}
  57. {% block coreBottomJs %}
  58.     <script>
  59.         app.onCustomEvent('appInit', function () {
  60.             app.loadCss('{{ asset('bundles/my/css/style.css') }}');
  61.         });
  62.         window.fbAsyncInit = function() {
  63.             FB.init({
  64.                 appId      : '2535896753112918',
  65.                 cookie     : true,
  66.                 xfbml      : true,
  67.                 version    : 'v5.0'
  68.             });
  69.             FB.AppEvents.logPageView();
  70.         };
  71.         (function(d, s, id){
  72.             var js, fjs = d.getElementsByTagName(s)[0];
  73.             if (d.getElementById(id)) {return;}
  74.             js = d.createElement(s); js.id = id;
  75.             js.src = "https://connect.facebook.net/en_US/sdk.js";
  76.             fjs.parentNode.insertBefore(js, fjs);
  77.         }(document, 'script', 'facebook-jssdk'));
  78.         app.onCustomEvent('appInit', function () {
  79.             $('.navbar-toggler').on('click', function(){
  80.                 $(this).toggleClass('collapsed');
  81.                 $('#mainNav').toggleClass('collapse');
  82.             });
  83.             setTimeout(function (){
  84.                 $('.page_navigation-open').on('click', function() {
  85.                     $(".page_navigation-wrap").toggleClass('showed-mob');
  86.                     $(".page_navigation-open").toggleClass('page_navigation-open-close');
  87.                 });
  88.                 $('.header_right-item-mobile').on('click', function(){
  89.                     $(".navigation .dropdown-menu").toggleClass('show');
  90.                     $(".navigation_wrap-right .dropdown").toggleClass('show');
  91.                     $(".navigation").toggleClass('active');
  92.                     $(".page_navigation-wrap").toggleClass('z-index');
  93.                     $(".header_right-item-mobile").toggleClass('active');
  94.                 });
  95.             },1000);
  96.         });
  97.     </script>
  98.     {% block profileJS %}
  99.     {% endblock profileJS %}
  100.     {% block pageJS %}
  101.     {% endblock pageJS %}
  102. {% endblock coreBottomJs %}