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

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