<!doctype html>
<html lang="{{ app.request.locale }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="{{ asset('public/favicon/favicon.ico') }}" />
{{ leogout_seo() }}
<link rel="preconnect" href="https://code.jquery.com" crossorigin>
<link rel="preconnect" href="https://apps.elfsight.com" crossorigin>
{% block metaTag %}
{% if meta_robots is defined and meta_robots is not empty %}
<meta name="robots" content="{{meta_robots}}">
{% else %}
<meta name="robots" content= "{% if ParametreSite().metaindex == 1 %}INDEX{% else %}NOINDEX{% endif %} , {% if ParametreSite().metafollow == 1 %}FOLLOW{% else %}NOFOLLOW{% endif %}">
{% endif %}
{% set currentPath = '/' %}
{% if app.request.attributes.get('_route_params')['slug'] is defined and app.request.attributes.get('_route_params')['slug'] == 'home' %}
<link href="{{app.request.schemeAndHttpHost}}" rel="canonical"/>
{% else %}
{% if canonical is defined and canonical != null %}
<link href="{{app.request.schemeAndHttpHost ~ canonical}}" rel="canonical"/>
{% else %}
<link href="{{app.request.uri}}" rel="canonical" />
{% endif %}
{% endif %}
{# <link rel="alternate" hreflang="x-default" href="{{app.request.schemeAndHttpHost ~ currentPath}}" /> #}
{# {% if ActifLanguage() %}
{% for item in ActifLanguage() %}
<link rel="alternate" hreflang="{{item.languagecode}}" href="{{app.request.schemeAndHttpHost ~ currentPath}}"/>
{% endfor %}
{% endif %} #}
{% if custom_schemaOrg is defined and custom_schemaOrg != null %}
{{custom_schemaOrg|raw}}
{% endif %}
{% if schemaOrg is defined %}
{{schemaOrg|replace({"\\": "/"})|replace({"//": "/"})|raw}}
{% endif %}
{% if schema_breadcrumb is defined %}
{{schema_breadcrumb|replace({"\\": "/"})|replace({"//": "/"})|raw}}
{% endif %}
{% endblock %}
{% if ParametreSite().googleverification and ParametreSite().googleverification is not empty %}
<meta name="google-site-verification" content="{{ParametreSite().googleverification|raw}}" />
{% endif %}
{% if ParametreSite().codehead and ParametreSite().codehead is not empty %}
{{ParametreSite().codehead|raw}}
{% endif %}
{% block preload %}{% endblock %}
{% block stylesheets %}
{# {{ encore_entry_link_tags('app-theme') }} #}
<style>
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/css/_fonts.css')}}
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/css/_variables.min.css')}}
{# {% include 'front/config_theme.html.twig' %} #}
{% for file in encore_entry_css_files('app-theme') %}
{{ source('@PUBLIC' ~ file) }}
{% endfor %}
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/css/style.min.css')}}
</style>
{% endblock %}
</head>
<body class="page-lp">
{% if ParametreSite().codebody and ParametreSite().codebody is not empty %}
{{ParametreSite().codebody|raw}}
{% endif %}
{% block navbar %}
{{ render(controller('App\\Controller\\Front\\FunctionController::renderHeaderLp')) }}
{% endblock %}
<main class="page-lp">
{% block body %}{% endblock %}
</main>
{# {{ render(controller('App\\Controller\\Front\\FunctionController::renderDefaultBloc')) }} #}
{% block footer %}
{{ render(controller('App\\Controller\\Front\\FunctionController::renderFooterLp',{ 'TypeMenu': 'Footer' })) }}
{% endblock %}
{% block javascripts %}
<script src="{{asset('templates/front/theme1/assets/js/jquery-3.6.0.min.js')}}" ></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js" async></script>
<script src="{{asset('templates/front/theme1/assets/plugins/galerie-isotope-wow/js/plugins.js')}}"></script>
{{ encore_entry_script_tags('app-theme') }}
{% if ParametreSite().typerecaptcha == 2 %}
<script>
(function () {
'use strict';
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.querySelectorAll('.needs-validation');
// Loop over them and prevent submission
Array.prototype.slice.call(forms).forEach(function (form) {
form.addEventListener('submit', function (event) {
form.classList.add('was-validated');
if (!form.checkValidity()) {
event.preventDefault();
event.stopPropagation();
return false;
}
var recaptchaContainers = document.querySelectorAll('.g-recaptcha');
if(recaptchaContainers.length == 1){
// Ajouter la validation reCAPTCHA ici
var recaptchaResponse = grecaptcha.getResponse();
if (recaptchaResponse.length === 0) {
// Si la réponse reCAPTCHA est vide, ne pas soumettre le formulaire
alert('Veuillez valider reCAPTCHA.');
event.preventDefault();
event.stopPropagation();
} else {
// Si tout est valide, désactivez le bouton et laissez le formulaire se soumettre
$(form).find('button[type="submit"]').attr('disabled', 'true');
}
}
}, false);
});
})();
</script>
{% endif %}
{% if ParametreSite().typerecaptcha == 1 %}
<script>
// new WOW().init();
(function () {
'use strict'
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.querySelectorAll('.needs-validation')
// Loop over them and prevent submission
Array.prototype.slice.call(forms)
.forEach(function (form) {
form.addEventListener('submit', function (event) {
form.classList.add('was-validated')
if (!form.checkValidity()) {
event.preventDefault()
event.stopPropagation()
return false;
}
event.preventDefault();
$(form).find('button[type="submit"]').attr('disabled','true');
grecaptcha.execute('{{ParametreSite().clekey}}', {action: 'create_comment'}).then(token => {
$(form).find('[name=g-recaptcha-response]').val(token);
form.submit();
});
}, false)
})
})()
function reCaptchaOnFocus() {
var head = document.getElementsByTagName('head')[0]
var script = document.createElement('script')
script.type = 'text/javascript';
script.src = 'https://www.google.com/recaptcha/api.js?render={{ParametreSite().clekey}}'
head.appendChild(script);
};
if(document.getElementsByClassName('form-recap')){
for (let i = 0; i < document.getElementsByClassName('form-recap').length; i++) {
document.getElementsByClassName('form-recap')[i].addEventListener('focus', (event) => {
reCaptchaOnFocus()
}, true);
}
}
</script>
{% endif %}
{% if Cookies() != null %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/cookies/cookie.html.twig',{}, with_context = false)}}
{% endif %}
<script>
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/js/script.js')}}
</script>
{% endblock %}
</body>
</html>