{% extends "front/"~ app.request.server.get('APP_THEME') ~"/base.html.twig" %}
{% block preload %}
{% if header_images is defined and header_images is not empty %}
{% for item in header_images %}
{% if item.path is defined %}
<link rel="preload" as="image" href="{{asset_image(item.path)}}" />
{% endif %}
{% endfor %}
{% endif %}
{% if preload_images != '' %}
{{preload_images|raw}}
{% endif %}
{% endblock %}
{% block stylesheets %}
{{parent()}}
{% if modele_galerie[0].type == 4 %}
<link rel="stylesheet" type="text/css" href="{{asset('templates/front/theme1/assets/plugins/flexslider/flexslider.css')}}" media="screen" >
{% endif %}
{% if modele_galerie[0].type == 10 and not is_mobile() %}
<style>
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/plugins/pana-accordion-master/accordion.css')}}
</style>
{% endif %}
{% if custom_style is defined and custom_style is not empty %}
<style>
{{custom_style|raw}}
</style>
{% endif %}
{% endblock %}
{% block body %}
{% if galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty %}
{{ include(template_from_string(template_model_gallerie)) }}
{% endif %}
{% if bloc_post is defined %}
{% for bloc in bloc_post.Bloc %}
{% if is_mobile() and bloc.mobile == true %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% endif %}
{% if is_full_view() and is_mobile() == false and bloc.desktop == true %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% endif %}
{% endfor %}
{% endif %}
{# {{ include ('front/'~ app.request.server.get('APP_THEME') ~'/popup.html.twig', {'popup': popup})}} #}
{% endblock %}
{% block javascripts %}
{{parent()}}
{% if modele_galerie[0].type == 4 %}
<script src="{{asset('templates/front/theme1/assets/plugins/flexslider/jquery.flexslider.js')}}" ></script>
<script>
/*-------------------------------------------------*/
/* = Sx flexslider
/*-------------------------------------------------*/
if ($(".sx_flexslider").length) {
console.log($(".sx_flexslider").length);
$('.flex-carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: true,
slideshow: false,
itemWidth: 150,
asNavFor: '.flex-slider'
});
$('.flex-slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: true,
slideshow: false,
sync: ".flex-carousel"
});
}
</script>
{% endif %}
{% if modele_galerie[0].type == 10 and not is_mobile() %}
<script>
{{ source ('front/'~ app.request.server.get('APP_THEME') ~'/assets/plugins/pana-accordion-master/pana-accordion.js')}}
</script>
<script>
if ($(window).width() > 767){
accordion.init({
id: 'accordion',
autoPlay:false,
extpand:1,
expandWidth: $(window).width() - (($(window).width() / 4) * 2),
itemWidth: $(window).width() / 4,
});
}
if(window.innerWidth < 992){
var prk_panel_event="click";
} else {
var prk_panel_event="hover";
}
if(window.innerWidth >= 991){
/* Height de bloc_header_bottom */
var pos = 62;
$( "#sx-accordion .panel-counter" ).each(function() {
$(this).css({ top: pos });
pos = pos + 153;
});
}
if ( $( "#sx-accordion" ).length ) {
var headerH = $('header').outerHeight();
var heightHead = headerH+'px';
var heightcarousel = 'calc(100vh - '+heightHead+')';
$('#sx-accordion').accordionSlider({
width:'100%',
height: heightcarousel,
shadow: true,
autoplay:false,
mouseDelay:100,
openPanelDuration:500,
closePanelDuration:500,
closePanelsOnMouseOut: true,
//mouseWheelTarget: 'page',
startPanel:-1,
maxOpenedPanelSize:'60%',
openPanelOn:prk_panel_event,
panelOverlap:false,
mouseWheel: false,
panelOpenComplete: function(event) {
},
panelClick: function(event) {
},
breakpoints: {
767: {
height: 508,
maxOpenedPanelSize:'50%',
orientation: 'vertical',
touchSwipe: false
}
}
});
}
</script>
{% endif %}
{% endblock %}