templates/campus/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block page_contents %}
  3. <section class="section section-page-title bg-gradient py-xl-5 py-4" data-aos='fade-down'>
  4.   <div class="container">
  5.     <div class="row">
  6.       <div class="col-xl-11 mx-auto text-center text-white d-flex justify-content-center align-items-center flex-md-row flex-column">
  7.         <div class="campus-logo bg-white mr-md-4 mr-0 my-md-0 my-3">
  8.           {% if campus.logo %}
  9.           <img src="{{ (campus.logo ? campus.logo.path : '') | mediaUrl }}" onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/campus.jpg') }}';" alt="{{ campus.seoH1 }}">
  10.           {% else %}
  11.             <img src="{{ asset('assets/images/campus/logo-estiam.png') }}">
  12.             <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>
  13.           {% endif %}
  14.         </div>
  15.         <h1 class="page-name font-weight-bold my-2 flex-1 text-md-left">
  16.           {% if campus.seoH1 %}
  17.             {{ campus.seoH1 }}
  18.           {% else %}
  19.             {{ "Venez découvrir le campus ÉSTIAM à" | trans ~ ' ' ~ campus.name ~ ' ' ~"! École d'informatique à" | trans ~ ' ' ~campus.name }}
  20.           {% endif %}
  21.       </div>
  22.     </div>
  23.   </div>
  24. </section>
  25. <section class="section section-campus-content mt-4 mb-5">
  26.   <div class="container">
  27.     <div class="row">
  28.       <div class="col-lg-8 mb-4" data-aos='fade-right'>
  29.         {% for block in campus.presentationBlocks %}
  30.         <div class="block-content keepEditorStyle text-dark-purple text-justify mt-lg-4 pt-2">
  31.           <h2>{{ block.title | raw }}</h2>
  32.           {{ block.description | raw }}
  33.         </div>
  34.         {% endfor %}
  35.       </div>
  36.       <div class="col-lg-4">
  37.         <div class="block-prochain d-flex flex-column h-100 p-3 mb-4" data-aos='fade-left'>
  38.           <div class="section-title mb-4"><span>/</span> Prochains événements</div>
  39.           {% if jpos %}
  40.             {% for jpo in jpos %}
  41.             <div class="p-item d-flex mb-4">
  42.               <div class="p-date d-flex flex-column justify-content-center align-items-center">
  43.                 <div class="font-weight-bold line-1 mb-1">{{ jpo.date|formatDateLocale('d') }}</div>
  44.                 <div class="text-uppercase line-2">{{ jpo.date|formatDateLocale('MMM')[:3] }}</div>
  45.               </div>
  46.               <a class="p-text flex-1 d-flex flex-column justify-content-center py-1" 
  47.               href="{{ path('open_day') }}?scroll=jpo-{{ jpo.id }}">
  48.                 <div class="p-name font-weight-bold text-uppercase mb-2">
  49.                   {{ jpo.name }}
  50.                 </div>
  51.                 <div class="p-link mt-auto">
  52.                   <span>{% trans %}En savoir plus{% endtrans %}<i class="far fa-arrow-right"></i></span>
  53.                 </div>
  54.               </a>
  55.             </div>
  56.             {% endfor %}
  57.           {% else %}
  58.             <div class="text-center">{% trans %}Aucun évènement en cours{% endtrans %}</div>
  59.           {% endif %}
  60.         </div>
  61.       </div>
  62.     </div>
  63.   </div>
  64. </section>
  65. {% if campus.articles | length > 0 %}
  66. <section class="section section-campus-news pt-5">
  67.   <div class="container">
  68.     <div class="row">
  69.       {% for article in campus.articles %}
  70.       <div class="col-lg-6 mb-xl-5 mb-4">
  71.         <div class="n-item d-flex h-100 flex-md-row flex-column" data-aos='fade-up'>
  72.           <div class="n-icon hover-zoom position-relative mx-auto">
  73.             {% if article.image %}
  74.             <img class="w-100" src="{{ article.image.path | mediaUrl }}">
  75.             {% endif %}
  76.           </div>
  77.           <div class="n-content flex-1 d-flex flex-column h-100 font-weight-300 text-justify position-relative keepEditorStyle">
  78.             <div class="text-left font-18 text-purple font-weight-bold mb-2">{{ article.title }}</div>
  79.             {{ article.description | raw }}
  80.           </div>
  81.         </div>
  82.       </div>
  83.       {% endfor %}
  84.     </div>
  85.   </div>
  86. </section>
  87. {% endif %}
  88. {% if campus.images | length > 0 %}
  89. <section class="section section-gallery-carousel section-campus-slider mb-5 mt-4" data-aos='fade-up'>
  90.   <div class="container">
  91.     <div class="row">
  92.       <div class="col-12">
  93.         <div class="slider slider-campus-detail pb-3">
  94.           {% for image in campus.images %}
  95.           <div>
  96.             <img class="w-100" src="{{ image.path | mediaUrl }}">
  97.           </div>
  98.           {% endfor %}
  99.         </div>
  100.       </div>
  101.     </div>
  102.   </div>
  103. </section>
  104. {% endif %}
  105. <section class="section section-gallery-carousel section-campus-parlent py-4" data-aos='fade-up'>
  106.   <div class="container">
  107.     <div class="row">
  108.       <div class="col-12 text-center">
  109.         <div class="section-title mb-4"><span>/</span> Nos étudiants en parlent le mieux !</div>
  110.       </div>
  111.       <div class="col-12">
  112.         <div class="slider slider-campus-parlent">
  113.           {% for student in outStudentArticles %}
  114.             <div>
  115.               <div class="t-box d-flex flex-column h-100 position-relative">
  116.                 <div class="t-img position-absolute t-0">
  117.                   <img src="{{ asset('assets/images/parlent/mask.png') }}" width="148" class="position-relative">
  118.                   <div class="position-absolute w-100 h-100 l-0 t-0 rounded-circle" style="background-image: url({{ student.imageUrl }});"></div>
  119.                 </div>
  120.                 <div class="t-content d-flex flex-column h-100 px-4 pt-md-3 pb-3">
  121.                   <div class="t-icon">
  122.                     <div class="line-1 text-purple text-md-left font-weight-bold flex-1 text-md-left">{{ student.title }}</div>
  123.                   </div>
  124.                   <div class="t-text text-dark-purple text-justify">
  125.                     {{ student.content }}
  126.                   </div>
  127.                 </div>
  128.               </div>
  129.             </div>
  130.           {% endfor %}
  131.         </div>
  132.       </div>
  133.     </div>
  134.   </div>
  135. </section>
  136. {% if campus.keyFigures | length > 0 %}
  137. <section class="section section-campus-chiffres bg-light pt-4">
  138.   <div class="container">
  139.     <div class="row">
  140.       <div class="col-12">
  141.         <div class="section-title mb-4" data-aos='fade-down'><span>/</span> Chiffres clés</div>
  142.       </div>
  143.       <div class="col-xl-9 mx-auto">
  144.         <div class="row justify-content-center">
  145.           {% for keyFigure in campus.keyFigures %}
  146.           <div class="col-lg-3 col-md-4 col-6 mb-xl-5 mb-4" data-aos='zoom-in'>
  147.             <div class="c-circle">
  148.               <div class="circle" data-value="{{ keyFigure.percent / 100 }}"></div>
  149.               <div class="text">{{ keyFigure.percent }}%</div>
  150.             </div>
  151.             <div class="c-text font-weight-300 font-italic text-center mx-xl-2">
  152.               {{ keyFigure.title }}
  153.             </div>
  154.           </div>
  155.           {% endfor %}
  156.         </div>
  157.       </div>
  158.     </div>
  159.   </div>
  160. </section>
  161. {% endif %}
  162. {% if campus.youtubeUrl %}
  163. <section class="section section-gallery-carousel bg-purple pb-4 pt-5" data-aos='fade-up'>
  164.   <div class="container">
  165.     <div class="row">
  166.       <div class="col-xl-7 mx-auto ">
  167.         <div class="section-title text-white mb-4"><span>/</span>  Vidéo sur le campus</div>
  168.         <div class="slider campus-video-slider pb-md-4">
  169.           {% for youtubeUrl in campus.youtubeUrl %}
  170.             <div>
  171.               <div class="embed-responsive embed-responsive-16by9 hvr-glow">
  172.                 <iframe class="embed-responsive-item" src="{{ youtubeUrl | extractYoutubeId }}?rel=0" allowfullscreen></iframe>
  173.               </div>
  174.             </div>
  175.           {% endfor %}
  176.         </div>
  177.       </div>
  178.     </div>
  179.   </div>
  180. </section>
  181. {% endif %}
  182. {% if campus.campusCenters | length > 0 %}
  183. <section class="section section-campus-location" data-aos='fade-up'>
  184.   <div class="container-fluid">
  185.     <div class="row {{ campus.campusCenters | length == 1 ? 'one-location' : 'two-location' }} ">
  186.       {% for center in campus.campusCenters %}
  187.       <div class="{{ campus.campusCenters | length == 1 ? 'col-12' : 'col-lg-6' }} px-0">
  188.         <div class="center-map" id="center-map-{{ center.id }}" style="height: 400px;"></div>
  189.         <div class="px-xl-5 px-md-4 px-3 {{ campus.campusCenters | length == 1 ? 'container' : '' }}">
  190.           <div class="location d-flex align-items-center">
  191.             <div class="l-box px-4 py-4">
  192.               <div class="l-name font-weight-bold text-purple font-25">
  193.                 ÉSTIAM Campus {{ campus.name }} {% if campus.name == 'Paris' %}{{ loop.index == 1 ? '20ème' : '13ème' }}{% endif %}
  194.               </div>
  195.               <div class="l-add d-flex my-3">
  196.                 <div><i class="fa-light fa-location-dot font-12"></i></div>
  197.                 <div class="flex-1 ml-2">
  198.                   <div class="text-dark-purple">
  199.                     {% if center.address %}<div>{{ center.address }}</div>{% endif %}
  200.                     {% if center.address2 %}<div>{{ center.address2 }}</div>{% endif %}
  201.                     {% if center.postalCode or center.city %}<div>{{ center.postalCode }} {{ center.city }}</div>{% endif %}
  202.                     {% if center.country %}<div>{{ center.country }}</div>{% endif %}
  203.                   </div>
  204.                   {% if center.googleMapUrl %}
  205.                     <a href="{{ center.googleMapUrl }}" target="_blank">(carte)</a>
  206.                   {% endif %}
  207.                 </div>
  208.               </div>
  209.               {% if center.transportMethods %}
  210.               <div class="l-detail mb-3 text-dark-purple">
  211.                 <small style="white-space: pre-wrap;">{{ center.transportMethods | raw }}</small>
  212.               </div>
  213.               {% endif %}
  214.               <div class="l-contact">
  215.                 {% if center.contactEmail %}
  216.                 <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>
  217.                 {% endif %}
  218.                 {% if center.disabilityReferentName or center.disabilityReferentEmail %}
  219.                   <p class="mb-0">
  220.                     <span class="font-weight-300 font-italic">Référent handicap :</span>
  221.                     <span class="font-weight-bold text-nowrap d-inline-block">
  222.                       {{ center.disabilityReferentName }}
  223.                     {% if center.disabilityReferentName and center.disabilityReferentEmail  %} - {% endif %}
  224.                     {% if center.disabilityReferentEmail %}
  225.                       <a class="font-weight-bold" href="mailto:{{ center.disabilityReferentEmail }}">
  226.                         {{ center.disabilityReferentEmail }}
  227.                       </a>
  228.                     {% endif %}
  229.                     </span>
  230.                   </p>
  231.                 {% endif %}
  232.               </div>
  233.             </div>
  234.           </div>
  235.         </div>
  236.       </div>
  237.       {% endfor %}
  238.     </div>
  239.   </div>
  240. </section>
  241. {% endif %}
  242. {% endblock %}
  243. {% block custom_javascripts %}
  244. <script src="https://maps.google.com/maps/api/js?&region=France&key=AIzaSyAAq_3rBXv_JZgDNmNZMuIARuTCkkyf1VY" type="text/javascript"></script>
  245. <script type="text/javascript" src="{{ asset('assets/js/jquery.inview.js') }}"></script>
  246. <script type="text/javascript" src="{{ asset('assets/js/jquery-circle-progress.js') }}"></script>
  247. <script type="text/javascript">
  248. $(document).ready(function(){
  249.   $('.campus-video-slider').not(".slick-initialized").slick({
  250.       slidesToShow: 1,
  251.       dots: true,
  252.       infinite: true,
  253.       useTransform: false,
  254.       prevArrow: '<button type="button" class="slick-prev slick-arrow"><i class="fat fa-angle-left"></i></button>',
  255.       nextArrow: '<button type="button" class="slick-next slick-arrow"><i class="fat fa-angle-right"></i></button>',
  256.       responsive: [{
  257.         breakpoint: 600,
  258.         settings: {
  259.           arrows: true,
  260.           centerPadding: "10px",
  261.           slidesToShow: 1
  262.         }
  263.       }]
  264.     })
  265.   $('.section-campus-chiffres').bind('inview', function (event, visible) {
  266.     if (visible == true) {
  267.       $('.circle').circleProgress({
  268.         fill: {color: '#ff0000'},
  269.         startAngle: -Math.PI / 2,
  270.         size: 107
  271.       });
  272.     }
  273.   });
  274.   function map_recenter(map, latlng,offsetx,offsety) {
  275.     var point1 = map.getProjection().fromLatLngToPoint(
  276.         (latlng instanceof google.maps.LatLng) ? latlng : map.getCenter()
  277.     );
  278.     var point2 = new google.maps.Point(
  279.         ( (typeof(offsetx) == 'number' ? offsetx : 0) / Math.pow(2, map.getZoom()) ) || 0,
  280.         ( (typeof(offsety) == 'number' ? offsety : 0) / Math.pow(2, map.getZoom()) ) || 0
  281.     );  
  282.     map.setCenter(map.getProjection().fromPointToLatLng(new google.maps.Point(
  283.         point1.x - point2.x,
  284.         point1.y + point2.y
  285.     )));
  286. }
  287.   async function renderCenterMap(center) {
  288.     console.log(center, 'center')
  289.     const latlng = new google.maps.LatLng(center.latitude, center.longtitude)
  290.     const map = new google.maps.Map(document.getElementById('center-map-' + center.id), {
  291.       zoom: 16,
  292.       center: latlng,
  293.       disableDefaultUI: true,
  294.       mapTypeId: google.maps.MapTypeId.ROADMAP,
  295.       styles: [
  296.         {
  297.           "elementType": "labels",
  298.           "stylers": [
  299.             {
  300.               "visibility": "off"
  301.             }
  302.           ]
  303.         },
  304.         {
  305.           "featureType": "administrative.country",
  306.           "elementType": "labels.text",
  307.           "stylers": [
  308.             {
  309.               "visibility": "on"
  310.             }
  311.           ]
  312.         },
  313.         {
  314.           "featureType": "administrative.land_parcel",
  315.           "stylers": [
  316.             {
  317.               "visibility": "off"
  318.             }
  319.           ]
  320.         },
  321.         {
  322.           "featureType": "administrative.neighborhood",
  323.           "stylers": [
  324.             {
  325.               "visibility": "off"
  326.             }
  327.           ]
  328.         },
  329.         {
  330.           "featureType": "administrative.province",
  331.           "elementType": "labels.text",
  332.           "stylers": [
  333.             {
  334.               "visibility": "on"
  335.             }
  336.           ]
  337.         },
  338.         {
  339.           "featureType": "road",
  340.           "elementType": "labels.text",
  341.           "stylers": [
  342.             {
  343.               "visibility": "on"
  344.             }
  345.           ]
  346.         }
  347.       ]
  348.     });
  349.     google.maps.event.addListenerOnce(map, 'idle', function(){
  350.       map_recenter(map, latlng, 200, 0)
  351.     });
  352.     let centerTimeout = null
  353.     google.maps.event.addListener(map, 'center_changed', function() {
  354.         clearTimeout(centerTimeout)
  355.         centerTimeout = setTimeout(function() {
  356.           map_recenter(map, latlng, 200, 0)
  357.         }, 200)
  358.     })
  359.     const image = {
  360.       url: "{{ asset('assets/images/icons/icon-location-purple.png') }}",
  361.       size: new google.maps.Size(27, 38)
  362.     };
  363.     const marker = new google.maps.Marker({
  364.       position: latlng,
  365.       map: map,
  366.       icon: image
  367.     });
  368.   }
  369.   const centers = {{ centerLocationList | json_encode() | raw }};
  370.   centers.forEach(center => renderCenterMap(center))
  371. })  
  372. </script>
  373. {% endblock %}