{% extends "site/base.html.twig" %}
{% block content %}
{% include 'site/includes/_swiper_hero.html.twig' %}
<section id="abcm" class="relative flex-col flex bg-white flex justify-center pb-24 px-8 lg:px-4 xl:px-44">
<div id="presentation" class="z-10 bg-white sm:-mt-20 w-full pt-12 sm:px-20">
<h2 class="text-primary mb-4 text-2.5xl font-heading break-all">{{ 'LG_ABCM_ZWEISPRACHIGKEIT'|trans({'fr':'ABCM ZWEISPRACHIGKEIT'}) }}</h2>
<div id="presentation_txt" class="leading-7 text-justify font-semibold tracking-wide">
{{ 'LG_ACCUEIL_TEXTE_ABCM'|trans() |raw }}
</div>
</div>
<a class="mt-8 w-max sm:mx-20 z-20 bg-secondary text-white px-10 py-1 rounded-2xl transitioning hover:bg-transparent hover:text-secondary border-transparent border-2 hover:border-secondary" href="{{ path('actualites') }}">{{ 'LG_ACTUALITES_ABCM'|trans({'fr':'Actualités ABCM'}) }}</a>
</section>
<section id="ecole" class="relative z-10 text-black px-8 sm:px-28 lg:px-24 xl:px-64 py-20">
<h2 class="flex flex-col uppercase text-center text-3xl sm:text-4.5xl font-heading">{{ 'LG_ECOLES_ABCM'|trans({'fr':'Écoles ABCM'}) }}</h2>
<div class="flex flex-col lg:flex-row justify-between items-center my-12 md:my-24 gap-8">
<div class="lg:w-45p leading-7 font-semibold tracking-wide">
{{ 'LG_ACCUEIL_TEXTE_ECOLES'|trans() |raw }}
<a class="mt-8 bg-secondary text-white font-normal px-10 py-1 rounded-2xl transitioning hover:bg-transparent hover:text-secondary border-transparent border-2 hover:border-secondary" href="{{ path('trouver-ecole') }}">{{ 'LG_TROUVER_ECOLE'|trans({'fr':'Trouver une école'}) }}</a>
</div>
<div class="w-full lg:w-1/2 h-96">
<div id="map" class="w-full h-full font-semibold"></div>
</div>
</div>
<ul class="flex -mb-28 flex-col md:flex-row gap-12 md:gap-0 items-center md:items-stretch justify-center">
<li class="flex flex-col justify-between items-center text-center md:w-1/3">
<p class="font-bold text-xl leading-7 md:mb-12">{{ 'LG_ACCUEIL_VALEUR_1'|trans({'fr':'De la maternelle au CM2'}) }}</p>
<img class="w-24 lg:w-28" src="{{ asset('img/icones/cartable.png') }}">
</li>
<li class="flex flex-col justify-between items-center text-center md:w-1/3">
<p class="font-bold text-xl leading-7 md:mb-12">{{ 'LG_ACCUEIL_VALEUR_2'|trans({'fr':'Plus de 120 salariés'}) }}</p>
<img class="w-24 lg:w-28" src="{{ asset('img/icones/salaries.png') }}">
</li>
<li class="flex flex-col justify-between items-center text-center md:w-1/3">
<p class="font-bold text-xl leading-7 md:mb-12">{{ 'LG_ACCUEIL_VALEUR_3'|trans({'fr':'Depuis 1991'}) }}</p>
<img class="w-24 lg:w-28" src="{{ asset('img/icones/grimoire.png') }}">
</li>
</ul>
</section>
<section id="immersion" class="relative bg-white text-black px-8 sm:px-28 lg:px-24 xl:px-64 pt-36 pb-12">
<h2 class="uppercase text-tertiary-300 leading-none text-center text-3xl sm:text-4.5xl font-heading h-40 xs:h-28 relative mb-4 xs:mb-12">{{ 'LG_IMMERSION_TITRE'|trans({'fr':'L\'immersion :'}) }}
<span class="normal-case"> {{ 'LG_IMMERSION_TITRE_2'|trans({'fr':'Wàs esch dès ?', 'de':'Wàs esch dès ?'}) }}</span></h2>
<div class="relative w-full h-96 lg:h-132 mb-12">
<div id="load" class="cursor-pointer absolute z-10 rounded-full bg-white hover:bg-secondary transitioning w-32 h-20 flex justify-center items-center abs-center">
<div id="arrow"></div>
</div>
<iframe id="video" class="hidden w-full h-full" src="{{ 'LG_VIDEO_YOUTUBE_ACCUEIL'|trans({'fr':'https://www.youtube.com/embed/iiJWJbbstNk'}) }}" title="YouTube video player"
frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
<img class="opacity-75 w-full h-full object-cover " src="{{ asset('img/tmp/AdobeStock_309458557_Preview.jpeg') }}">
</div>
</section>
<section id="actu" class="relative bg-tertiary px-8 sm:px-28 lg:px-24 xl:px-64 xl:pr-40 py-12">
<h2 class="uppercase text-black text-3xl sm:text-4.5xl font-heading">{{ 'LG_ACTUALITES'|trans() }}</h2>
<div class="flex flex-col sm:flex-row sm:flex-wrap justify-center sm:justify-start items-center gap-8 mt-16 mb-8">
{% for actualite in actualites %}
{% set hasPhoto = (actualite.photo is not empty) %}
<a href="{{ path('actualites_detail', {slug:actualite.titreUrl, actualite:actualite.id}) }}" class="cursor-pointer w-full sm:w-2/5 md:w-1/4 xl:w-1/5 h-48 relative">
<img alt="{{ actualite.titre }}" class="w-full h-full object-cover" src="{{ hasPhoto ? ('actualites/'~actualite.photo)|imagine_filter('tm'): asset('/img/tmp/actu-haguenau.jpg') }}">
<p class="absolute -right-2 top-2 w-min bg-white text-tertiary-300 rounded-2xl text-center px-4">{{ actualite.date|date('d/m') }}</p>
<div class="absolute x-center bottom-2 text-white bg-primary rounded-full text-center text-xs w-9/12 py-3 px-4">
<p class="mb-0">{{ actualite.titre }}</p>
</div>
</a>
{% endfor %}
<a class="w-8 h-8 rounded-full flex items-center justify-center text-3xl bg-secondary text-white
hover:bg-transparent transitioning hover:text-secondary border-transparent border-2 hover:border-secondary" href="{{ path('actualites') }}">
<span class="-mt-1">+</span>
</a>
</div>
</section>
<section id="partenaire" class="relative bg-white px-8 sm:px-28 lg:px-24 xl:px-64 py-12">
<h2 class="uppercase text-tertiary text-3xl sm:text-4.5xl font-heading">{{ 'LG_NOS_PARTENAIRES'|trans({'fr':'Nos partenaires'}) }}</h2>
<div id="slider-partenaire" class="z-20 mt-16 mb-8 z-0 swiper-container relative w-full sm:pr-12 lg:pr-0">
<div class="swiper-wrapper">
{% for partenaire in partenaires %}
<div class="swiper-slide h-auto flex items-center justify-center p-4 xl:p-12 bg-white">
{% if partenaire.getMedias() is not empty %}
{% set fichier = partenaire.getMedias()[0].fichier %}
<img class="w-full h-full object-contain" src="{{ asset('/medias/fournisseurs/'~ partenaire.id ~ '/'~ fichier) }}" alt="{{ partenaire.societe }}">
{% else %}
<p>{{ partenaire.societe }}</p>
{% endif %}
</div>
{% endfor %}
</div>
</div>
<div class="hidden sm:block swiper-part_next absolute y-center mt-8 right-24 lg:right-12 xl:right-52 z-50 cursor-pointer">
<i class="fas fa-chevron-right text-6xl md:text-4xl text-primary"></i>
</div>
</section>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript">
function initMap() {
const center = {lat: 48.39878707042242, lng: 7.309071389609192};
const places = [
{% for ecole in ecoles %}
{% set nom = (app.request.locale == "de")?ecole.nomDe:ecole.nom %}
{% set hasPhoto = (ecole.photo is not empty) %}
["<span class='title-map'>A.B.C.M. Zweisprachigkeit</span><br>" +
"<strong class='ecole-map'>{{ nom }}</strong><br><br>" +
{% if hasPhoto %}
"<div class='w-full h-32'><img class='w-full object-cover h-full' src='{{ asset(ecole.getPhotoUrl()) | imagine_filter('tl') }}'></div><br>" +
{% endif %}
"<div class='sub-container-map w-full'><span class='flex items-center leading-5'><img class='w-4 mr-2' src='/img/icones/pin.svg'>{{ ecole.adresse }},<br> {{ ecole.codePostal }} {{ ecole.ville }}</span>" +
"<a href='tel:+33{{ ecole.tel1 |slice(8) }}'><img class='w-4 mr-2' src='/img/icones/telephone.svg'>{{ ecole.tel1 }}</a><br>" +
{% if ecole.siteUrl is not empty %}"<a href='{{ ecole.siteUrl }}' target='_blank'><img class='w-4 mr-2' src='/img/icones/web.svg'>{{ ecole.siteTitre }}</a><br>" + {% endif %}
"<a href='{{ ecole.facebook }}' target='_blank'><img class='w-4 mr-2' src='/img/icones/facebook.svg'>Facebook</a></div>"
, {{ ecole.latitude }}, {{ ecole.longitude }}, '{{ ecole.couleur }}'],
{% endfor %}
]
const infowindow = new google.maps.InfoWindow();
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 7,
center: center,
});
setMarkers(map);
function setMarkers(map) {
var markers = [];
for (let i = 0; i < places.length; i++) {
const place = places[i];
let url = "/img/icones/";
url += place[3] + "-pin.png";
var icon = {
url: url, // url
scaledSize: new google.maps.Size(40, 40), // scaled size
};
let marker = new google.maps.Marker({
position: { lat: place[1], lng: place[2] },
map,
icon: icon,
title: place[0],
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', function(){
infowindow.close(); // Close previously opened infowindow
infowindow.setContent(place[0]);
infowindow.open(map, marker);
restoreColors()
this.setIcon(pinSymbol('red'));
});
google.maps.event.addListener(infowindow, "closeclick", function() {
restoreColors()
});
function pinSymbol(color) {
return {
url: '/img/icones/'+ color +'-pin.png',
scaledSize: new google.maps.Size(40, 40), // scaled size
};
}
function restoreColors() {
for (var i = 0; i < markers.length; i++) {
markers[i].setIcon(pinSymbol(place[3]));
}
}
}
}
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key={{ constant('WWW_PARAM_GAPI_KEY') }}&callback=initMap&libraries=&v=weekly"></script>
{% endblock %}