templates/Default/video.html.twig line 1

  1. {% set title = video.title %}
  2. {% set desc = video.description %}
  3. {% set menu = 'articles' %}
  4. {% set subtitle = 'Publications' %}
  5. {% if video.banner %}
  6. {% set thumbnail = video.banner.thumbnail %}
  7. {% set banner = asset(video.banner.file) %}
  8. {% elseif video.youtube %}
  9. {% set thumbnail = video.youtube|youtubeThumbnail %}
  10. {% set banner = video.youtube|youtubeThumbnail('h') %}
  11. {% endif %}
  12. {% extends 'Default/base.html.twig' %}
  13. {% block banner %}
  14. <div id='banner' class='htop-in bg-success relative gpadding {{desktop("")}} {{mobile("")}}'>
  15.     <div class='relative flex col w100 {{desktop("top-40-in")}} {{mobile("vt-20-in")}}'>
  16.         <div class='white {{desktop("gpadding top-40-in")}} {{mobile("")}}'>
  17.             <h1 class='text-center'>{{title}}</h1>
  18.             <div class="flex row center">
  19.                 <i class="border-left border-white border-1x border-solid {{desktop("vt-25-in")}} {{mobile("vt-10-in")}}"></i>
  20.             </div>
  21.         </div>
  22.     </div>
  23. </div>
  24. {% endblock banner %}
  25. {% block content %}
  26. <div class='gpadding {{desktop("vt-40-in")}} {{mobile("vt-20-in")}} '>
  27.     <div class='{{desktop("gpadding flex col space")}} {{mobile("")}}'>
  28.         <div class='w100'>
  29.             <div id='article' class='w100 radius-10 {{desktop("")}} {{mobile("")}}'>
  30.                 {% if video.description %}
  31.                 <p class='h4 black semibold {{desktop("adapt bottom-40")}} {{mobile("bottom-20")}}'>{{video.description|nl2br}}</p>
  32.                 {% endif %}
  33.                 {% if video.youtube %}
  34.                 <div class='w100'>
  35.                     <iframe class='w100 youtube-frame msquare shadow-alt bg-gray' src='{{video.youtube|replace({"youtu.be/":"youtube.com/watch?v="})|replace({"watch?v=":"embed/"})}}' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>
  36.                 </div>
  37.                 {% endif %}
  38.                 {% if video.file %}
  39.                 <div class='w100'>
  40.                     <video class='w100 shadow-alt bg-gray {{desktop("radius-20")}} {{mobile("radius-10")}}' controls='' autoplay='' src='{{path("file-read",{id:video.file.id})}}' preload='auto'></video>
  41.                 </div>
  42.                 {% endif %}
  43.             </div>
  44.         </div>
  45.     </div>
  46. </div>
  47. {% endblock %}