templates/Front/Channel/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ channel.name }} - {{ parent() }}{% endblock %}
  3. {% block content %}
  4.     <div class="background-image-channel channel-page font-poppins">
  5.         <div class="container py-3 px-0">
  6.             <div class="col-12" style="margin-top: 5rem;margin-bottom: 5rem;">
  7.                 <div class="row">
  8.                     <div class="col-12 col-md-8">
  9.                         <div class="d-flex flex-row">
  10.                             {% include 'Front/Channel/Image/_image_main_avatar.html.twig' with {'channel': channel, 'custom_class_channel': 'channel-avatar-presentation'} %}
  11.                             {% if channel.name or channel.slogan %}
  12.                                 <div class="ml-3 d-flex flex-column justify-content-center">
  13.                                     {% if channel.name %}
  14.                                         <p class="v2-title-small full-black mb-0">{{ channel.name }}</p>
  15.                                     {% endif %}
  16.                                     {% if channel.slogan %}
  17.                                         <div>
  18.                                             <p class="full-black mb-0">{{ channel.slogan }}</p>
  19.                                         </div>
  20.                                     {% endif %}
  21.                                 </div>
  22.                             {% endif %}
  23.                         </div>
  24.                     </div>
  25.                     <div class="col-12 col-md-4 social-top">
  26.                         {% include 'Front/Channel/social-links.twig' with {'channel': channel, 'icon_color': 'black'} %}
  27.                     </div>
  28.                     <div class="col-12 mt-4">
  29.                         <div class="row">
  30.                             {% if channel.presentationTitle %}
  31.                             <div class="col-12">
  32.                                 <p class="v2-title-big full-black mt-3 text-center">{{ channel.presentationTitle }}</p>
  33.                             </div>
  34.                             {% endif %}
  35.                             {% if channel.presentationText %}
  36.                             <div class="col-12">
  37.                                 <p class="mt-3 text-center white-space-pre-wrap">{{ channel.presentationText }}</p>
  38.                             </div>
  39.                             {% endif %}
  40.                             <div class="col-12 mt-4 text-center text-md-left d-flex buttons">
  41.                                 <a href="#our-trainings" class="mt-2 btn-nellapp-v2 btn-nellap-v2-responsive-small">{{ 'front.channel.show.our_trainings.label'|trans }}</a>
  42.                                 {% if channel.institutions|length > 0 or channel.contactPhone or channel.contactEmail or channel.links|length > 0 %}
  43.                                     <a href="#contact-us" class="mt-2 btn-nellapp-v2-secondary btn-nellap-v2-responsive-small">{{ 'front.home.welcome.button.contact'|trans }}</a>
  44.                                 {% endif %}
  45.                             </div>
  46.                         </div>
  47.                     </div>
  48.                 </div>
  49.             </div>
  50.         </div>
  51.     </div>
  52.     {{ parent() }}
  53. {% endblock content %}
  54. {% block inner_content %}
  55.     {# Trainings #}
  56.     <div class="row" id="our-trainings">
  57.         <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
  58.             <div class="section-title-type-formation">
  59.                 <h2 class="ml-0">
  60.                     {{ 'front.channel.show.tabs.home.subtitles.trainings.label'|trans({'%count%': count_trainings}) }}
  61.                 </h2>
  62.             </div>
  63.         </div>
  64.     </div>
  65.     <div class="row flex-nowrap flex-sm-nowrap flex-md-nowrap flex-lg-nowrap flex-xl-wrap v3-cards">
  66.         <div class="scrollable-bar-hidden" style="--_grid-columns: 4">
  67.             {% for training in last_four_trainings %}
  68.                 <twig:TrainingCard :training="training"/>
  69.             {% endfor %}
  70.         </div>
  71.     </div>
  72.     {% if count_trainings > 4 %}
  73.         <div class="col-12 mt-2 pb-5">
  74.             <div class="all-trainings">
  75.                 <a href="{{ path('front_channel_trainings', {'id': channel.id}) }}" class="text-decoration-none">
  76.                     {{ 'front.channel.show.actions.see_more.label'|trans({'%count_displayed_item%': last_four_trainings|length, '%count_all_items%': count_trainings}) }}
  77.                 </a>
  78.             </div>
  79.         </div>
  80.     {% endif %}
  81.     {# Gallery #}
  82.     {% if channel.galleryImages|length >= 5 %}
  83.         <div class="row gallery mt-4 justify-content-center text-center">
  84.             {% for galleryImage in channel.galleryImages %}
  85.                 {% if loop.index0 % 2 == 1 %}
  86.                     {% set imageTopColumn = true %}
  87.                 {% endif %}
  88.                 {% if loop.index0 % 2 == 0 %}
  89.                     {% set imageTopColumn = false %}
  90.                 {% endif %}
  91.                 {% if loop.index0 == 0 %}
  92.                     <div class="col-12 col-md-6">
  93.                         <div data-size="{{ galleryImage.image|image_size }}" class="gallery-big-one gallery-image"
  94.                              style="background-image: url({{ asset('uploads/channel_images/' ~ galleryImage.image.name ~ '.' ~ galleryImage.image.extension) }});">
  95.                         </div>
  96.                     </div>
  97.                 {% endif %}
  98.                 {% if loop.index0 > 0 and loop.index0 < 5 %}
  99.                     {% if imageTopColumn %}
  100.                         <div class="col-3 d-none d-md-block">
  101.                         <div data-size="{{ galleryImage.image|image_size }}" class="gallery-small-top gallery-image"
  102.                              style="background-image: url({{ asset('uploads/channel_images/' ~ galleryImage.image.name ~ '.' ~ galleryImage.image.extension) }});">
  103.                         </div>
  104.                     {% else %}
  105.                         <div>
  106.                             {% if loop.index0 == 4 and channel.galleryImages|length > 5 %}
  107.                                 {% set countMoreContent = channel.galleryImages|length - 5 %}
  108.                                 <div class="more-content font-poppins font-weight-bold d-flex justify-content-center flex-column">
  109.                                     <div class="counter">+{{ countMoreContent }}</div>
  110.                                 </div>
  111.                             {% endif %}
  112.                             <div data-size="{{ galleryImage.image|image_size }}" class="gallery-bottom-top gallery-image"
  113.                                  style="background-image: url({{ asset('uploads/channel_images/' ~ galleryImage.image.name ~ '.' ~ galleryImage.image.extension) }});">
  114.                             </div>
  115.                         </div>
  116.                         </div>
  117.                     {% endif %}
  118.                 {% endif %}
  119.                 {% if loop.index0 >= 5 %}
  120.                     <div data-size="{{ galleryImage.image|image_size }}" class="gallery-image d-none"
  121.                          style="background-image: url({{ asset('uploads/channel_images/' ~ galleryImage.image.name ~ '.' ~ galleryImage.image.extension) }});">
  122.                     </div>
  123.                 {% endif %}
  124.             {% endfor %}
  125.         </div>
  126.         <div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
  127.             <div class="pswp__bg"></div>
  128.             <div class="pswp__scroll-wrap">
  129.                 <div class="pswp__container">
  130.                     <div class="pswp__item"></div>
  131.                     <div class="pswp__item"></div>
  132.                     <div class="pswp__item"></div>
  133.                 </div>
  134.                 <div class="pswp__ui pswp__ui--hidden">
  135.                     <div class="pswp__top-bar">
  136.                         <div class="pswp__counter"></div>
  137.                         <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
  138.                         <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
  139.                         <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
  140.                         <div class="pswp__preloader">
  141.                             <div class="pswp__preloader__icn">
  142.                                 <div class="pswp__preloader__cut">
  143.                                     <div class="pswp__preloader__donut"></div>
  144.                                 </div>
  145.                             </div>
  146.                         </div>
  147.                     </div>
  148.                     <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
  149.                     </button>
  150.                     <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
  151.                     </button>
  152.                     <div class="pswp__caption">
  153.                         <div class="pswp__caption__center"></div>
  154.                     </div>
  155.                 </div>
  156.             </div>
  157.         </div>
  158.     {% endif %}
  159.     {# Partners #}
  160.     {% if channel.partners|length > 0 %}
  161.         <div class="row mt-5">
  162.             <div class="col-12">
  163.                 <h2 class="v2-title-small mt-5 mb-2">{{ 'front.channel.show.partners.label'|trans }} ({{ channel.partners|length }})</h2>
  164.             </div>
  165.             <div class="col-lg-12 col-md-12">
  166.                 <div class="row">
  167.                     <div class="col-12">
  168.                         <div class="slider-container">
  169.                             <ul class="slider-controls" id="customize-controls-partner" aria-label="Carousel Navigation" tabindex="0">
  170.                                 <li class="prev" data-controls="prev" aria-controls="customize" tabindex="-1">
  171.                                     <img src="{{ asset('build/common/background-white-left.svg', 'common') }}" alt="Go to left"/>
  172.                                 </li>
  173.                                 <li class="next" data-controls="next" aria-controls="customize" tabindex="-1">
  174.                                     <img src="{{ asset('build/common/background-white-right.svg', 'common') }}" alt="Go to right"/>
  175.                                 </li>
  176.                             </ul>
  177.                             <div class="my-slider partner-slider">
  178.                                 {% for partner in channel.partners %}
  179.                                     <div class="slider-item">
  180.                                         <div class="slider-card">
  181.                                             <img class="slider-img" src="{{ asset('uploads/channel_images/' ~ partner.image.name ~ '.' ~ partner.image.extension) }}" alt="{{ partner.name }}"/>
  182.                                         </div>
  183.                                     </div>
  184.                                 {% endfor %}
  185.                             </div>
  186.                         </div>
  187.                     </div>
  188.                 </div>
  189.             </div>
  190.         </div>
  191.     {% endif %}
  192.     {# Key informations #}
  193.     {% if channel.channelDescriptions|length > 0 %}
  194.     <div class="row channel-key-informations">
  195.         <div class="col-12">
  196.             <h2 class="v2-title-small mt-5 mb-2">{{ 'front.channel.show.some_key_information.label'|trans }}</h2>
  197.         </div>
  198.         <div class="col-lg-12 col-md-12 font-poppins">
  199.             <div class="row">
  200.                 {% for channelDescription in channel.channelDescriptions %}
  201.                     <div class="col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 mt-4">
  202.                         {% include 'Front/Channel/channel-description.html.twig' with {'channelDescription' : channelDescription} %}
  203.                     </div>
  204.                 {% endfor %}
  205.             </div>
  206.         </div>
  207.     </div>
  208.     {% endif %}
  209.     {# Teachers #}
  210.     {% if teachers|length > 0 %}
  211.         <div class="row mt-3 channel-teachers">
  212.             <div class="col-12">
  213.                 <h2 class="v2-title-small mt-5 mb-2">{{ 'front.scholar.training.show.sub_title.teacher.label'|trans }}
  214.                     ({{ teachers|length }})</h2>
  215.             </div>
  216.             {% for teacher in teachers %}
  217.                 {% if loop.index0 < 5 %}
  218.                     <div class="col-12">
  219.                         <div class="mt-3">
  220.                             {% include 'Front/Scholar/Card/teacher-channel.html.twig' with {'teacher' : teacher} %}
  221.                         </div>
  222.                     </div>
  223.                 {% endif %}
  224.             {% endfor %}
  225.             {% if teachers|length > 5 %}
  226.                 <div class="col-12 div-more-teacher">
  227.                     <div class="row">
  228.                         {% for teacher in teachers %}
  229.                             {% if loop.index0 >= 5 %}
  230.                                 <div class="col-12">
  231.                                     <div class="mt-3">
  232.                                         {% include 'Front/Scholar/Card/teacher-channel.html.twig' with {'teacher' : teacher} %}
  233.                                     </div>
  234.                                 </div>
  235.                             {% endif %}
  236.                         {% endfor %}
  237.                     </div>
  238.                 </div>
  239.             {% endif %}
  240.         </div>
  241.         {% if teachers|length > 5 %}
  242.             <div class="row pb-2 mb-5">
  243.                 <div class="col-12">
  244.                     <div class="all-trainings">
  245.                         <button class="see-more-btn text-decoration-none" id="teacher-see-more">
  246.                             {{ 'front.channel.show.actions.see_more.label'|trans({'%count_displayed_item%': 5, '%count_all_items%': teachers|length}) }}
  247.                         </button>
  248.                     </div>
  249.                 </div>
  250.             </div>
  251.         {% endif %}
  252.     {% endif %}
  253.     {# Comments #}
  254.     {% if advices|length > 0 %}
  255.         <div class="row mt-3 {{ advices|length <= 5 ? 'mb-5 pb-2' : '' }}">
  256.             <div class="col-12">
  257.                 <div class="row">
  258.                     <div class="col-12">
  259.                         <div class="div-title-between mt-5 mb-2">
  260.                             <h2 class="v2-title-small">{{ 'front.scholar.training.show.sub_title.advice.label'|trans }}
  261.                                 ({{ advices|length }})</h2>
  262.                             <p class=""><i class="far fa-star"></i> {{ channel|advice_avg_by_channel }}</p>
  263.                         </div>
  264.                     </div>
  265.                     <div class="col-12">
  266.                         <div class="mt-3">
  267.                             {% for advice in advices|slice(0, 5) %}
  268.                                 {% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}
  269.                             {% endfor %}
  270.                             <div class="div-more-advice">
  271.                                 {% for advice in advices|slice(5) %}
  272.                                     {% include 'Front/Scholar/Card/advice.html.twig' with {'advice' : advice} %}
  273.                                 {% endfor %}
  274.                             </div>
  275.                         </div>
  276.                     </div>
  277.                 </div>
  278.             </div>
  279.         </div>
  280.     {% endif %}
  281.     {% if advices|length > 5 %}
  282.         <div class="row pb-2 mb-5">
  283.             <div class="col-12">
  284.                 <div class="all-trainings">
  285.                     <button class="see-more-btn text-decoration-none" id="training-advice-see-more">
  286.                         {{ 'front.channel.show.actions.see_more.label'|trans({'%count_displayed_item%': 5, '%count_all_items%': advices|length}) }}
  287.                     </button>
  288.                 </div>
  289.             </div>
  290.         </div>
  291.     {% endif %}
  292.     {% include 'Front/Channel/find-us-contact-us.html.twig' with {'channel' : channel} %}
  293. {% endblock inner_content %}