{% 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-xl-11 mx-auto text-center text-white d-flex justify-content-center align-items-center flex-md-row flex-column">
<div class="campus-logo bg-white mr-md-4 mr-0 my-md-0 my-3">
{% if campus.logo %}
<img src="{{ (campus.logo ? campus.logo.path : '') | mediaUrl }}" onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/campus.jpg') }}';" alt="{{ campus.seoH1 }}">
{% else %}
<img src="{{ asset('assets/images/campus/logo-estiam.png') }}">
<div class="text-right"><span class="text-orange font-weight-bold">/</span> <span class="font-weight-bold text-dark-purple text-uppercase">{{ campus.city }}</span></div>
{% endif %}
</div>
<h1 class="page-name font-weight-bold my-2 flex-1 text-md-left">
{% if campus.seoH1 %}
{{ campus.seoH1 }}
{% else %}
{{ "Venez découvrir le campus ÉSTIAM à" | trans ~ ' ' ~ campus.name ~ ' ' ~"! École d'informatique à" | trans ~ ' ' ~campus.name }}
{% endif %}
</div>
</div>
</div>
</section>
<section class="section section-campus-content mt-4 mb-5">
<div class="container">
<div class="row">
<div class="col-lg-8 mb-4" data-aos='fade-right'>
{% for block in campus.presentationBlocks %}
<div class="block-content keepEditorStyle text-dark-purple text-justify mt-lg-4 pt-2">
<h2>{{ block.title | raw }}</h2>
{{ block.description | raw }}
</div>
{% endfor %}
</div>
<div class="col-lg-4">
<div class="block-prochain d-flex flex-column h-100 p-3 mb-4" data-aos='fade-left'>
<div class="section-title mb-4"><span>/</span> Prochains événements</div>
{% if jpos %}
{% for jpo in jpos %}
<div class="p-item d-flex mb-4">
<div class="p-date d-flex flex-column justify-content-center align-items-center">
<div class="font-weight-bold line-1 mb-1">{{ jpo.date|formatDateLocale('d') }}</div>
<div class="text-uppercase line-2">{{ jpo.date|formatDateLocale('MMM')[:3] }}</div>
</div>
<a class="p-text flex-1 d-flex flex-column justify-content-center py-1"
href="{{ path('open_day') }}?scroll=jpo-{{ jpo.id }}">
<div class="p-name font-weight-bold text-uppercase mb-2">
{{ jpo.name }}
</div>
<div class="p-link mt-auto">
<span>{% trans %}En savoir plus{% endtrans %}<i class="far fa-arrow-right"></i></span>
</div>
</a>
</div>
{% endfor %}
{% else %}
<div class="text-center">{% trans %}Aucun évènement en cours{% endtrans %}</div>
{% endif %}
</div>
</div>
</div>
</div>
</section>
{% if campus.articles | length > 0 %}
<section class="section section-campus-news pt-5">
<div class="container">
<div class="row">
{% for article in campus.articles %}
<div class="col-lg-6 mb-xl-5 mb-4">
<div class="n-item d-flex h-100 flex-md-row flex-column" data-aos='fade-up'>
<div class="n-icon hover-zoom position-relative mx-auto">
{% if article.image %}
<img class="w-100" src="{{ article.image.path | mediaUrl }}">
{% endif %}
</div>
<div class="n-content flex-1 d-flex flex-column h-100 font-weight-300 text-justify position-relative keepEditorStyle">
<div class="text-left font-18 text-purple font-weight-bold mb-2">{{ article.title }}</div>
{{ article.description | raw }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if campus.images | length > 0 %}
<section class="section section-gallery-carousel section-campus-slider mb-5 mt-4" data-aos='fade-up'>
<div class="container">
<div class="row">
<div class="col-12">
<div class="slider slider-campus-detail pb-3">
{% for image in campus.images %}
<div>
<img class="w-100" src="{{ image.path | mediaUrl }}">
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% endif %}
<section class="section section-gallery-carousel section-campus-parlent py-4" data-aos='fade-up'>
<div class="container">
<div class="row">
<div class="col-12 text-center">
<div class="section-title mb-4"><span>/</span> Nos étudiants en parlent le mieux !</div>
</div>
<div class="col-12">
<div class="slider slider-campus-parlent">
{% for student in outStudentArticles %}
<div>
<div class="t-box d-flex flex-column h-100 position-relative">
<div class="t-img position-absolute t-0">
<img src="{{ asset('assets/images/parlent/mask.png') }}" width="148" class="position-relative">
<div class="position-absolute w-100 h-100 l-0 t-0 rounded-circle" style="background-image: url({{ student.imageUrl }});"></div>
</div>
<div class="t-content d-flex flex-column h-100 px-4 pt-md-3 pb-3">
<div class="t-icon">
<div class="line-1 text-purple text-md-left font-weight-bold flex-1 text-md-left">{{ student.title }}</div>
</div>
<div class="t-text text-dark-purple text-justify">
{{ student.content }}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% if campus.keyFigures | length > 0 %}
<section class="section section-campus-chiffres bg-light pt-4">
<div class="container">
<div class="row">
<div class="col-12">
<div class="section-title mb-4" data-aos='fade-down'><span>/</span> Chiffres clés</div>
</div>
<div class="col-xl-9 mx-auto">
<div class="row justify-content-center">
{% for keyFigure in campus.keyFigures %}
<div class="col-lg-3 col-md-4 col-6 mb-xl-5 mb-4" data-aos='zoom-in'>
<div class="c-circle">
<div class="circle" data-value="{{ keyFigure.percent / 100 }}"></div>
<div class="text">{{ keyFigure.percent }}%</div>
</div>
<div class="c-text font-weight-300 font-italic text-center mx-xl-2">
{{ keyFigure.title }}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if campus.youtubeUrl %}
<section class="section section-gallery-carousel bg-purple pb-4 pt-5" data-aos='fade-up'>
<div class="container">
<div class="row">
<div class="col-xl-7 mx-auto ">
<div class="section-title text-white mb-4"><span>/</span> Vidéo sur le campus</div>
<div class="slider campus-video-slider pb-md-4">
{% for youtubeUrl in campus.youtubeUrl %}
<div>
<div class="embed-responsive embed-responsive-16by9 hvr-glow">
<iframe class="embed-responsive-item" src="{{ youtubeUrl | extractYoutubeId }}?rel=0" allowfullscreen></iframe>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if campus.campusCenters | length > 0 %}
<section class="section section-campus-location" data-aos='fade-up'>
<div class="container-fluid">
<div class="row {{ campus.campusCenters | length == 1 ? 'one-location' : 'two-location' }} ">
{% for center in campus.campusCenters %}
<div class="{{ campus.campusCenters | length == 1 ? 'col-12' : 'col-lg-6' }} px-0">
<div class="center-map" id="center-map-{{ center.id }}" style="height: 400px;"></div>
<div class="px-xl-5 px-md-4 px-3 {{ campus.campusCenters | length == 1 ? 'container' : '' }}">
<div class="location d-flex align-items-center">
<div class="l-box px-4 py-4">
<div class="l-name font-weight-bold text-purple font-25">
ÉSTIAM Campus {{ campus.name }} {% if campus.name == 'Paris' %}{{ loop.index == 1 ? '20ème' : '13ème' }}{% endif %}
</div>
<div class="l-add d-flex my-3">
<div><i class="fa-light fa-location-dot font-12"></i></div>
<div class="flex-1 ml-2">
<div class="text-dark-purple">
{% if center.address %}<div>{{ center.address }}</div>{% endif %}
{% if center.address2 %}<div>{{ center.address2 }}</div>{% endif %}
{% if center.postalCode or center.city %}<div>{{ center.postalCode }} {{ center.city }}</div>{% endif %}
{% if center.country %}<div>{{ center.country }}</div>{% endif %}
</div>
{% if center.googleMapUrl %}
<a href="{{ center.googleMapUrl }}" target="_blank">(carte)</a>
{% endif %}
</div>
</div>
{% if center.transportMethods %}
<div class="l-detail mb-3 text-dark-purple">
<small style="white-space: pre-wrap;">{{ center.transportMethods | raw }}</small>
</div>
{% endif %}
<div class="l-contact">
{% if center.contactEmail %}
<p class="mb-0"><span class="font-weight-300 font-italic">Contactez-nous :</span> <a class="font-weight-bold" href="mailto:{{ center.contactEmail }}">{{ center.contactEmail }}</a></p>
{% endif %}
{% if center.disabilityReferentName or center.disabilityReferentEmail %}
<p class="mb-0">
<span class="font-weight-300 font-italic">Référent handicap :</span>
<span class="font-weight-bold text-nowrap d-inline-block">
{{ center.disabilityReferentName }}
{% if center.disabilityReferentName and center.disabilityReferentEmail %} - {% endif %}
{% if center.disabilityReferentEmail %}
<a class="font-weight-bold" href="mailto:{{ center.disabilityReferentEmail }}">
{{ center.disabilityReferentEmail }}
</a>
{% endif %}
</span>
</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% endblock %}
{% block custom_javascripts %}
<script src="https://maps.google.com/maps/api/js?®ion=France&key=AIzaSyAAq_3rBXv_JZgDNmNZMuIARuTCkkyf1VY" type="text/javascript"></script>
<script type="text/javascript" src="{{ asset('assets/js/jquery.inview.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/jquery-circle-progress.js') }}"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.campus-video-slider').not(".slick-initialized").slick({
slidesToShow: 1,
dots: true,
infinite: true,
useTransform: false,
prevArrow: '<button type="button" class="slick-prev slick-arrow"><i class="fat fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next slick-arrow"><i class="fat fa-angle-right"></i></button>',
responsive: [{
breakpoint: 600,
settings: {
arrows: true,
centerPadding: "10px",
slidesToShow: 1
}
}]
})
$('.section-campus-chiffres').bind('inview', function (event, visible) {
if (visible == true) {
$('.circle').circleProgress({
fill: {color: '#ff0000'},
startAngle: -Math.PI / 2,
size: 107
});
}
});
function map_recenter(map, latlng,offsetx,offsety) {
var point1 = map.getProjection().fromLatLngToPoint(
(latlng instanceof google.maps.LatLng) ? latlng : map.getCenter()
);
var point2 = new google.maps.Point(
( (typeof(offsetx) == 'number' ? offsetx : 0) / Math.pow(2, map.getZoom()) ) || 0,
( (typeof(offsety) == 'number' ? offsety : 0) / Math.pow(2, map.getZoom()) ) || 0
);
map.setCenter(map.getProjection().fromPointToLatLng(new google.maps.Point(
point1.x - point2.x,
point1.y + point2.y
)));
}
async function renderCenterMap(center) {
console.log(center, 'center')
const latlng = new google.maps.LatLng(center.latitude, center.longtitude)
const map = new google.maps.Map(document.getElementById('center-map-' + center.id), {
zoom: 16,
center: latlng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [
{
"elementType": "labels",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "administrative.country",
"elementType": "labels.text",
"stylers": [
{
"visibility": "on"
}
]
},
{
"featureType": "administrative.land_parcel",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "administrative.neighborhood",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "administrative.province",
"elementType": "labels.text",
"stylers": [
{
"visibility": "on"
}
]
},
{
"featureType": "road",
"elementType": "labels.text",
"stylers": [
{
"visibility": "on"
}
]
}
]
});
google.maps.event.addListenerOnce(map, 'idle', function(){
map_recenter(map, latlng, 200, 0)
});
let centerTimeout = null
google.maps.event.addListener(map, 'center_changed', function() {
clearTimeout(centerTimeout)
centerTimeout = setTimeout(function() {
map_recenter(map, latlng, 200, 0)
}, 200)
})
const image = {
url: "{{ asset('assets/images/icons/icon-location-purple.png') }}",
size: new google.maps.Size(27, 38)
};
const marker = new google.maps.Marker({
position: latlng,
map: map,
icon: image
});
}
const centers = {{ centerLocationList | json_encode() | raw }};
centers.forEach(center => renderCenterMap(center))
})
</script>
{% endblock %}