{% extends 'base.html.twig' %}
{% block page_contents %}
<section class="section section-page-title bg-gradient py-xl-5 py-4" data-aos='fade-down'>
<div class="container">
<div class="row">
<div class="col-12 text-center text-white">
<h1 class="page-name font-weight-bold my-2">{% trans %}Nos Campus ÉSTIAM{% endtrans %}</h1>
</div>
</div>
</div>
</section>
<section class="section section-campus-gallery mb-xl-5 mb-4">
<div class="container-fluid px-0 position-relative">
<div class="row">
<div class="col"><img src="{{ asset('assets/images/campus/i-1.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-2.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-3.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-4.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-5.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-6.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-7.jpg') }}?v=1" data-aos='zoom-in'></div>
<div class="col"><img src="{{ asset('assets/images/campus/i-8.jpg') }}?v=1" data-aos='zoom-in'></div>
</div>
</div>
</section>
<section class="section mb-xl-5 mb-4" data-aos='fade-down'>
<div class="container">
<div class="row">
<div class="col-12">
<div class="section-title mb-4"><span>/</span> Des Campus à taille humaine partout en France</div>
<div>
<p>Dans un souci de préserver la relation entre étudiants et équipe pédagogique, ÉSTIAM fait le choix de créer des petits campus, plutôt que de grands pôles impersonnels.<br/>
Cela permet aussi de s’assurer que la pédagogie et le savoir-faire ÉSTIAM sont implémentés et conservés dans chacun des campus.<br/>
Chaque établissement est habilité à recevoir des personnes en situation de handicap (sous réserve que la situation de santé de la personne soit stabilisée, de l’absence de contre-indications à l’exercice de la profession et dans la limite d’aménagements raisonnables - loi du 11 février 2005)</p>
</div>
</div>
<div class="col-12 campus-tags text-center mt-2">
{% for campus in campuses %}
<a href="{{ path('campus_detail', { slug : campus.slug }) }}">{{ campus.name }}</a>
{% endfor %}
</div>
</div>
</div>
</section>
{% if country != 'MA' %}
<section class="section section-map" data-aos='fade-up'>
<div id="home-map"></div>
<script src="https://maps.google.com/maps/api/js?®ion=France&key=AIzaSyAAq_3rBXv_JZgDNmNZMuIARuTCkkyf1VY" type="text/javascript"></script>
<script type="text/javascript">
window.addEventListener('load', function(e) {
var infowindow
var infoWindowTimeout
var mouseOverInfoWindow = false;
function addOpenInfoWindowListeners() {
var infoWindowElement = document.querySelector('.gm-style .gm-style-iw');
infoWindowElement.addEventListener('mouseout', function(event) {
console.log('mouseout info', event)
const toElement = event.relatedTarget || event.toElement
if (infoWindowElement !== event.target || toElement.nodeName === 'A') {
event.stopPropagation()
return
}
infowindow.close()
mouseOverInfoWindow = false;
});
infoWindowElement.addEventListener('mouseover', function(event) {
mouseOverInfoWindow = true;
});
}
async function runBlockMap(centers) {
//init map
var map = new google.maps.Map(document.getElementById('home-map'), {
zoom: 5.8,
center: new google.maps.LatLng(46.1314134,2.4349967),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
/*
const bounds = new google.maps.LatLngBounds(
new google.maps.LatLng(41.2632185,-5.4534286),
new google.maps.LatLng(51.268318, 9.8678344)
)
*/
const image = {
url: "{{ asset('assets/images/icons/icon-location-purple.png') }}",
size: new google.maps.Size(27, 38)
};
//create markers of specified cities
for (let i = 0; i < centers.length; i++) {
const latlng = new google.maps.LatLng(centers[i]['latitude'], centers[i]['longtitude'])
const marker = new google.maps.Marker({
position: latlng,
map: map,
icon: image
});
//bounds.extend(latlng);
marker.addListener('mouseover', function() {
if (infoWindowTimeout) clearTimeout(infoWindowTimeout);
try{
infowindow.close()
clearTimeout(infoWindowTimeout)
} catch(e) {}
infowindow = new google.maps.InfoWindow({
content: centers[i].infoContent
});
infowindow.open(map, marker);
google.maps.event.addListener(infowindow, 'domready', function() {
addOpenInfoWindowListeners();
})
});
marker.addListener('mouseout', function() {
infoWindowTimeout = setTimeout(function() {
if (!mouseOverInfoWindow) {
infowindow.close()
mouseOverInfoWindow = false;
}
}, 400);
});
if(window.innerWidth<767){
infowindow = new google.maps.InfoWindow({
content: centers[i].infoContent
});
infowindow.close(marker.get("map"), marker);
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.open(map, marker);
}
})(marker, i));
}
}
}
const centers = {{ centers | json_encode() | raw }};
runBlockMap(centers);
});
</script>
</section>
{% endif %}
{% endblock %}