templates/base.html.twig line 1

Open in your IDE?
  1. {% trans_default_domain 'base' %}
  2. {% set currentRoute = app.request.attributes.get('_route') %}
  3. {% set currentPath = app.request.uri %}
  4. <!DOCTYPE html>
  5. <html>
  6. <head {{ sonata_seo_head_attributes() }}>
  7.     <meta name="facebook-domain-verification" content="jgmxp79qc5w5g7esue8z3c3iy97fud" />
  8.     <!-- Google Tag Manager -->
  9.     <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  10.                 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  11.             j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  12.             'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  13.         })(window,document,'script','dataLayer','GTM-KWHDQNL');</script>
  14.     <!-- End Google Tag Manager -->
  15.     {{ sonata_seo_title() }}
  16.     {{ sonata_seo_metadatas() }}
  17.     {{ sonata_seo_link_canonical() }}
  18.     {{ sonata_seo_lang_alternates() }}
  19.     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  20.     {% block stylesheets %}
  21.         {{ encore_entry_link_tags('app') }}
  22.     {% endblock stylesheets %}
  23.     {% block canonical %}{% endblock canonical %}
  24.     <link rel="icon" type="image/x-icon" href="{{ asset('images/front/favicon.png') }}"/>
  25. </head>
  26. <body class="{% block body_class %}{{ body_class|default('page') }}{% endblock %}">
  27. <!-- Google Tag Manager (noscript) -->
  28. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KWHDQNL"
  29.                   height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  30. <!-- End Google Tag Manager (noscript) -->
  31. {% include '@SonataSeo/Block/_facebook_sdk.html.twig' %}
  32. {% include '@SonataSeo/Block/_twitter_sdk.html.twig' %}
  33. {% include '@SonataSeo/Block/_pinterest_sdk.html.twig' %}
  34. {% block navigation %}
  35.     {{ include('front/common/navigation.html.twig') }}
  36. {% endblock navigation %}
  37. {% block search %}
  38.     {{ include('front/search/index.html.twig') }}
  39. {% endblock search %}
  40. {% block header %}
  41.     {{ include('front/common/header.html.twig') }}
  42. {% endblock header %}
  43. {% block breadcrumb %}{% endblock breadcrumb %}
  44. {% block body %}
  45. {% endblock body %}
  46. {% block footer %}
  47.     {{ include('front/common/footer.html.twig') }}
  48. {% endblock footer %}
  49. {% block newsletter %}
  50.     {{ include('front/newsletter/index.html.twig') }}
  51. {% endblock newsletter %}
  52. {% block javascripts %}
  53.     {{ encore_entry_script_tags('app') }}
  54.     <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
  55.             integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
  56.             crossorigin="anonymous"></script>
  57.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
  58.             integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
  59.             crossorigin="anonymous"></script>
  60.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
  61.             integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
  62.             crossorigin="anonymous"></script>
  63.     {% if currentRoute == 'review_host' or currentRoute == 'review_client' %}
  64.     <script src='https://www.google.com/recaptcha/api.js'></script>
  65.     {% endif %}
  66. {% endblock javascripts %}
  67. {% if currentRoute == 'activity' %}
  68.     {# @var activity \App\Entity\Activity #}
  69. <script type="application/ld+json">
  70.     {
  71.         "@context": "https://schema.org",
  72.         "@type": "LocalBusiness",
  73.         "@id": "{{ currentPath }}",
  74.         "address": {
  75.             "@type": "PostalAddress",
  76.             "streetAddress": "{{ activity.address1 }} {{ activity.address2 }} {{ activity.address3 }}",
  77.             "addressLocality": "{{ activity.city.name }}",
  78.             "postalCode": "{{ activity.city.zipCode }}",
  79.             "addressCountry": "FR"
  80.         },
  81.         "name": "{{ activity.labelApidae }}",
  82.         "image": [
  83.             "{% path activity.visualDesktop, 'desktop' %}",
  84.             "{% path activity.visualMobile, 'mobile' %}"
  85.         ],
  86.         "telephone": "{{ activity.phone }}"
  87.     }
  88. </script>
  89. {% endif %}
  90. {% if currentRoute == 'article' %}
  91. {# @var article \App\Entity\Article #}
  92. <script type="application/ld+json">
  93.     {
  94.         "@context": "https://schema.org",
  95.         "@type": "Article",
  96.         "author": "Isère Attractivité",
  97.         "mainEntityOfPage": {
  98.             "@type": "WebPage",
  99.             "@id": "{{ currentPath }}"
  100.         },
  101.         "headline": "{{ article.title }}",
  102.         "image": [
  103.             "{% path article.visual, 'default' %}"
  104.         ],
  105.         "datePublished": "{{ article.createdAt|date('Y-m-d\TG:i:s\Z') }}",
  106.         "dateModified": "{{ article.updatedAt|date('Y-m-d\TG:i:s\Z') }}",
  107.         "publisher": {
  108.             "@type": "Organization",
  109.             "name": "Isère Attractivité",
  110.             "logo": {
  111.                 "@type": "ImageObject",
  112.                 "url": "https://evasion.ishere.fr/images/front/header/alpes_ishere.jpg"
  113.             }
  114.         },
  115.         "description": "{{ article.description }}"
  116.     }
  117. </script>
  118. {% endif %}
  119. <script>(function(d,u,ac){var s=d.createElement('script');s.type='text/javascript';s.src='https://a.omappapi.com/app/js/api.min.js';s.async=true;s.dataset.user=u;s.dataset.account=ac;d.getElementsByTagName('head')[0].appendChild(s);})(document,50971,57353);</script>
  120. <script src='{{ asset('js/leaflet-omnivore.min.js') }}'></script>
  121. </body>
  122. </html>