templates/front/theme1/base.html.twig line 101

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3.     <head>
  4.         <meta charset="utf-8" />
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta name="viewport" content="width=device-width, initial-scale=1">
  7.         {# <link rel="apple-touch-icon" sizes="60x60" href="{{asset('public/favicon/apple-touch-icon.png')}}">
  8.         <link rel="icon" type="image/png" sizes="32x32" href="{{asset('public/favicon/favicon-32x32.png')}}">
  9.         <link rel="icon" type="image/png" sizes="16x16" href="{{asset('public/favicon/favicon-16x16.png')}}"> #}
  10.         <link rel="icon" type="image/x-icon" href="{{ asset('public/favicon/favicon.ico') }}" />
  11.         {# <link rel="manifest" href="{{asset('public/favicon/site.webmanifest')}}"> #}
  12.         {{ leogout_seo() }} 
  13.         <link rel="preconnect" href="//www.google-analytics.com" crossorigin>
  14.         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  15.         <link rel="preconnect" href="https://code.jquery.com" crossorigin>
  16.         
  17.        
  18.         {# {% include 'front/preload_fonts.html.twig' %} #}
  19.         {# <link href="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.1.4/dist/css/datepicker.min.css" rel="stylesheet"> #}
  20.         <script src="{{asset('templates/front/theme1/assets/js/jquery-3.6.0.min.js')}}"></script>
  21.         
  22.         {% block metaTag %}
  23.                 {% if meta_robots is defined and meta_robots is not empty %}
  24.                     <meta name="robots" content="{{meta_robots}}">
  25.                 {% endif %}
  26.                 {% if canonical is defined and canonical != null  %}
  27.                         <link href="{{canonical}}" rel="canonical"/>
  28.                 {% else %}
  29.                     {% if app.request.attributes.get('_route') in ['index_page_home','plan_du_site']  %}
  30.                         {% set currentPath = path(app.request.attributes.get('_route'))  %}
  31.                     {% else %}
  32.                          {% set parametre_url = app.request.attributes.get('page') %}
  33.                          {% if parametre_url != null and parametre_url != '1' %}
  34.                              {% set currentPath = path(app.request.attributes.get('_route'),{slug:app.request.attributes.get('_route_params').slug,page:app.request.attributes.get('_route_params').page})   %}
  35.                          {% else %}
  36.                              {% set currentPath = path(app.request.attributes.get('_route'),{slug:app.request.attributes.get('_route_params').slug})  %}
  37.                          {% endif %}
  38.                     {% endif %}
  39.                 
  40.                     <link href="{{app.request.schemeAndHttpHost ~ currentPath}}" rel="canonical" />
  41.                 {% endif %}
  42.                 {# <link rel="alternate" hreflang="x-default" href="{{app.request.schemeAndHttpHost ~ currentPath}}" />  #}
  43.                 {% if ActifLanguage() %}
  44.                         {% for item in ActifLanguage() %}
  45.                             <link rel="alternate" hreflang="{{item.languagecode}}" href="{{app.request.schemeAndHttpHost ~ currentPath}}"/>
  46.                         {% endfor %}
  47.                 {% endif %}
  48.                 {% if custom_schemaOrg is defined and custom_schemaOrg != null  %}
  49.                     {{custom_schemaOrg|raw}}
  50.                 {% endif %}
  51.                 
  52.                 {% if schemaOrg is defined %}
  53.                      {{schemaOrg|replace({"\\": "/"})|replace({"//": "/"})|raw}}
  54.                 {% endif %}
  55.                 {% if schema_breadcrumb is defined %}
  56.                     {{schema_breadcrumb|replace({"\\": "/"})|replace({"//": "/"})|raw}}
  57.                 {% endif %}
  58.             
  59.         {% endblock %}
  60.         {% block preload %}{% endblock %}
  61.         {% block stylesheets %}
  62.         {#  {{ encore_entry_link_tags('app-theme') }} #}
  63.             <style>
  64.                 {# {% include 'front/config_theme.html.twig' %} #}
  65.                 
  66.                 {% for file in encore_entry_css_files('app-theme') %}
  67.                     {{ source('@PUBLIC' ~ file) }}
  68.                 {% endfor %}
  69.             </style>
  70.         {% endblock %}
  71.         <script async src="https://www.googletagmanager.com/gtag/js?id=G-XR7K60K3YD"></script>
  72.         <script>
  73.             window.dataLayer = window.dataLayer || [];
  74.             function gtag(){dataLayer.push(arguments);}
  75.             gtag('js', new Date());
  76.             gtag('config', 'G-XR7K60K3YD');
  77.         </script>
  78.     </head>
  79.     <body>
  80.         {% block navbar %}
  81.             {% set className = app.request.attributes.get('_route') == 'index_page_home'?'home_page':'' %}
  82.             {{ render(controller('App\\Controller\\Front\\FunctionController::renderMenu',{'className': className })) }} 
  83.         {% endblock %}
  84.         
  85.         <main class="{{app.request.attributes.get('_route') == 'index_page_home'?'home_page':''}}">
  86.           {% block body %}{% endblock %} 
  87.         </main>
  88.         <a href="javascript:void(0);" class="scroll-to-top" title="Haut" style="display: none;"><span>Haut</span></a>
  89.         {% block footer %}
  90.             {{ render(controller('App\\Controller\\Front\\FunctionController::renderFooter',{ 'TypeMenu': 'Footer' })) }}
  91.         {% endblock %}
  92.         {% block javascripts %}
  93.         
  94.             
  95.             <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
  96.             <script src="{{asset('templates/front/theme1/assets/plugins/wow-animate/js/wow.min.js')}}"></script>
  97.             <script src="{{asset('templates/front/theme1/assets/plugins/galerie-isotope-wow/js/isotope.pkgd.min.js')}}"></script>
  98.             <script src="{{asset('templates/front/theme1/assets/plugins/galerie-isotope-wow/js/plugins.js')}}"></script>
  99.             {# <script src="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.1.4/dist/js/datepicker-full.min.js"></script>
  100.             <script src="https://cdn.jsdelivr.net/npm/vanillajs-datepicker@1.2.0/dist/js/locales/fr.js"></script> #}
  101.             {{ encore_entry_script_tags('app-theme') }} 
  102.     
  103.             <script>
  104.                   // new WOW().init();
  105.                    (function () {
  106.                         'use strict'
  107.                         // Fetch all the forms we want to apply custom Bootstrap validation styles to
  108.                         var forms = document.querySelectorAll('.needs-validation')
  109.                         // Loop over them and prevent submission
  110.                         Array.prototype.slice.call(forms)
  111.                             .forEach(function (form) {
  112.                             form.addEventListener('submit', function (event) {
  113.                                 form.classList.add('was-validated')
  114.                                 if (!form.checkValidity()) {
  115.                                     event.preventDefault()
  116.                                     event.stopPropagation()
  117.                                     return false;
  118.                                 }
  119.                                 event.preventDefault();
  120.                                 $(form).find('button[type="submit"]').attr('disabled','true');
  121.                                 grecaptcha.execute('{{ParametreSite().clekey}}', {action: 'create_comment'}).then(token => {
  122.                                     $(form).find('[name=g-recaptcha-response]').val(token);
  123.                                     form.submit();
  124.                                 });
  125.                             }, false)
  126.                             })
  127.                     })()  
  128.                     function reCaptchaOnFocus() {
  129.                         var head = document.getElementsByTagName('head')[0]
  130.                         var script = document.createElement('script')
  131.                         script.type = 'text/javascript';
  132.                         script.src = 'https://www.google.com/recaptcha/api.js?render={{ParametreSite().clekey}}'
  133.                         head.appendChild(script);
  134.                     };  
  135.                     if(document.getElementsByClassName('form-recap')){
  136.                         for (let i = 0; i < document.getElementsByClassName('form-recap').length; i++) {
  137.                             document.getElementsByClassName('form-recap')[i].addEventListener('focus', (event) => {
  138.                                 reCaptchaOnFocus()
  139.                             }, true);
  140.                         }
  141.                     }
  142.             </script>
  143.             <script>
  144.                 $(document).ready(function(){
  145.                     /* const elems = document.querySelectorAll('.datepicker_input');
  146.                     for (const elem of elems) {
  147.                         const datepicker = new Datepicker(elem, {
  148.                             'format': 'dd/mm/yyyy',
  149.                             'language' : 'fr',
  150.                            // title: getDatePickerTitle(elem)
  151.                         });
  152.                     } */
  153.              
  154.                     $(window).on("scroll", function () {
  155.                         if ($(this).scrollTop() > $(window).height() / 2) {
  156.                             $(".scroll-to-top").fadeIn();
  157.                         } else {
  158.                              $(".scroll-to-top").fadeOut();
  159.                         }
  160.                     });
  161.                     $('.header-savoir-plus').on("click", function () {
  162.                         $("html, body").animate({ scrollTop: $('#bloc-content').offset().top - 100 }, "slow" );
  163.                         return false;
  164.                     });
  165.                     $(".scroll-to-top").on("click", function () {
  166.                         $("html, body").animate({ scrollTop: 0 }, 500);
  167.                         return false;
  168.                     });
  169.                     $('input[name="prestation[]"]').change(function(){
  170.                         if(this.hasAttribute('checked')){
  171.                             $(this).attr('checked',false);
  172.                         }else{
  173.                             $(this).attr('checked',true);
  174.                         }
  175.                         $.each($("input[name='prestation[]']"), function () {
  176.                             if (this.value == 'Autre' && this.hasAttribute('checked')) {
  177.                                 $('.autre_prestation').removeClass('d-none');
  178.                                 $('input[name="autre_prestation"]').attr('required',true);
  179.                             }else{
  180.                                 $('.autre_prestation').addClass('d-none');
  181.                                 $('input[name="autre_prestation"]').attr('required',false);
  182.                             }
  183.                         });
  184.                     
  185.                     });
  186.                     $('input[name="vous_etes"]').change(function(){
  187.                         if (this.value == 'Autre') {
  188.                             $('.autre_coordonne').removeClass('d-none');
  189.                             $('input[name="autre_coordonne"]').attr('required',true);
  190.                         }else{
  191.                             $('.autre_coordonne').addClass('d-none');
  192.                             $('input[name="autre_coordonne"]').attr('required',false);
  193.                         }
  194.                     });
  195.                 });
  196.             </script>
  197.             {% if Cookies() != null %}
  198.                   {{ include ('front/'~ app.request.server.get('APP_THEME') ~'/cookies/cookie.html.twig',{}, with_context = false)}}
  199.             {% endif %}
  200.         {% endblock %} 
  201.     </body>
  202. </html>