src/Notaris/FrontendBundle/Resources/views/tv/video.html.twig line 1

Open in your IDE?
  1. {% extends '@NotarisFrontend/layout2017.html.twig' %}
  2. {% if notaryId is defined %}
  3.     {% set headTitle = info.header1  | replace({"<BR />":" "}) ~ ' - ' ~  subsite.pageTitle %}
  4. {% else %}
  5.     {% set headTitle = subsite.pageTitle %}
  6.     {% if section.meta.ogTitle and section.parent and section.parent.meta.ogTitle %}
  7.         {% set headTitle = section.meta.ogTitle | trans ~ " | " ~ section.parent.meta.ogTitle | trans %}
  8.     {% endif %}
  9.     {% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}
  10. {% endif %}
  11. {% set linked_url_nl = url_nl ~ path('notaris_frontend_tv') %}
  12. {% set linked_url_fr = url_fr ~ path('notaris_frontend_tv') %}
  13. {% block title %}
  14.     <title>{{ headTitle }}</title>
  15. {% endblock %}
  16. {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_tv_detail_video', {slug: pageslug, slugvideo: video.slug}) %}
  17. {% block extralinks %}
  18.     <link rel="canonical" href="{{ canonicalLink }}"  />
  19. {% endblock %}
  20. {% block extrameta %}
  21.     <meta name="keywords" content="{{ section.meta.metaKeywords }}"/>
  22.     <meta name="description" lang="{{ locale }}" content="{{ section.meta.metaDescription }}"/>
  23.     <meta property="og:title" content="{{ 'tv_notaris' | trans | raw }} - {{ video.title }}" />
  24.     <meta property="og:type" content="video.movie" />
  25.     <meta property="og:url" content="{{ canonicalLink }}" />
  26.     {% if video.meta.ogDescription %}
  27.     <meta property="og:description" content="{{ video.meta.ogDescription }}" />
  28.     {% endif %}
  29.     {% if shareImageVideo %}
  30.         <meta property="og:image" content="{{ shareImageVideo }}" />
  31.         <meta property="og:image:width" content="1200" />
  32.         <meta property="og:image:height" content="630" />
  33.     {% else %}
  34.         {{ parent() }}
  35.     {% endif %}
  36. {% endblock %}
  37. {% block body %}
  38.     <section class="content u-padding-top-large">
  39.         {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
  40.         <div id="content-center" class="content-center-large standard">
  41.             <div id="content-center-header">
  42.                 <article class="niveau3">
  43.                     <div class="article-content">
  44.                         <h2 class="u-text-lineheight-semilarge u-h2@desktop">{{ 'tv_notaris' | trans | raw }} - {{ video.title }}</h2>
  45.                     </div>
  46.                 </article>
  47.             </div>
  48.             <section id="info" class="no-margin">
  49.                 <div id="info-content" class="niveau1 info-news-content">
  50.                     <article>
  51.                         {#{% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
  52.                             <div id="youtube_{{ video.asset.assetVideopaths[0].videopath.youtube }}"></div>
  53.                         {% else %}
  54.                             {% set poster = "" %}
  55.                             {% if video.asset.assetImages | length > 0 %}
  56.                                 {% set poster = '/uploads/' ~ locale ~ video.asset.assetImages[0].image.filename %}
  57.                             {% endif %}
  58.                             <video id="my_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" poster="{{ poster }}" width="100%" height="300" data-setup="{}">
  59.                                 <source src="/video/{{ locale }}/{{ video.asset.assetVideopaths[0].videopath.path }}" type="video/mp4" >
  60.                             </video>
  61.                         {% endif %}#}
  62.                         {% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
  63.                             <iframe class="o-tabpannel__content__youtube js-tabpannel-youtube u-margin-bottom-small" frameborder="0" allowfullscreen="1" title="YouTube video player" width="490" height="280" src="//www.youtube-nocookie.com/embed/{{ video.asset.assetVideopaths[0].videopath.youtube }}?enablejsapi=1&widgetid=1&rel=0" kwframeid="2"></iframe>
  64.                         {% else %}
  65.                             {% set poster = "" %}
  66.                             {% if video.asset.assetImages | length > 0 %}
  67.                                 {% set poster = '/uploads/' ~ locale ~ video.asset.assetImages[0].image.filename %}
  68.                             {% endif %}
  69.                             <video class="o-tabpannel__content__video js-tabpannel-video u-margin-bottom-small" controls preload="auto" poster="{{ poster }}" width="100%" height="300">
  70.                                 <source src="/video/{{ locale }}/{{ video.asset.assetVideopaths[0].videopath.path }}">
  71.                             </video>
  72.                         {% endif %}
  73.                         <h2>{{ video.publicationDate | localdate }}</h2>
  74.                     </article>
  75.                     {% if video.tags | length > 0 %}
  76.                         {#<article class="tags">
  77.                             <p>
  78.                                 {% for tag in video.tags %}
  79.                                     <a data-slug="{{ tag.slug }}" href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}" title="{{ tag.name }}">{{ tag.name }}</a>
  80.                                 {% endfor %}
  81.                             </p>
  82.                             <div class="cleaner">&nbsp;</div>
  83.                         </article>#}
  84.                         <div class="c-tags u-margin-top-small u-padding-left-small u-padding-right-small js-tags">
  85.                             {% for tag in video.tags %}
  86.                                 <a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}" data-slug="{{ tag.slug }}" data-tag-clicked="{{ path('notaris_frontend_tag_clicked') }}" title="{{ tag.name }}" class="c-tags__item"><small>{{ tag.name }}</small></a>
  87.                             {% endfor %}
  88.                         </div>
  89.                         <div class="c-divider c-divider--light">&nbsp;</div>
  90.                     {% endif %}
  91.                     <div class="c-movies">
  92.                         <article class="u-no-border">
  93.                             <h1>{{ 'tv_gerelateerd' | trans | raw }}</h1>
  94.                         </article>
  95.                         {% for video in randomvideos %}
  96.                         <div class="c-movies__item">
  97.                             <a href="{{ path('notaris_frontend_tv_detail_video', {'slug': pageslug, 'slugvideo': video.slug}) }}" title="{{ video.title }}" class="o-grid__item o-object-fit c-movies__link {% if video.asset.assetImages | length == 0 %}o-grid__item--overlay{% endif %}" data-slug="{{ video.slug }}">
  98.                                 {% if video.asset.assetImages | length > 0 %}
  99.                                     {% set image_path = 'uploads/'~ locale ~ '/' ~ video.asset.assetImages[0].image.filename %}
  100.                                     {{image_path | responsive_image_source([448, 353, 436], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 448px, (min-width: 768px and max-width: 960px) 353px, (min-width: 480px and max-width: 768px) 436px, (max-width: 480px) 100vw', 'alt': video.title, 'title': video.title}) }}
  101.                                 {% endif %}
  102.                                 <div class="c-movies__overlay">
  103.                                     <div class="o-grid__item__overlay__title c-movies__info">
  104.                                         <h3 class="u-h4">{{ video.title }}</h3>
  105.                                     </div>
  106.                                     <button class="c-btn c-btn--icon c-btn--icon--large c-btn__play">
  107.                                         <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><style>.z{fill:#FFF;}</style><path class="z" d="M1576 927L248 1665q-23 13-39.5 3t-16.5-36V160q0-26 16.5-36t39.5 3l1328 738q23 13 23 31t-23 31z" fill="true"/></svg>
  108.                                     </button>
  109.                                 </div>
  110.                                 <div class="c-movies__info-back">
  111.                                     <span class="c-movies__meta">{{ video.publicationDate | localdate }}</span><br>
  112.                                     <span class="c-movies__meta c-movies__meta--theme">{{ 'tv_rubriek'|trans }}:</span>
  113.                                     <span class="c-movies__meta">{% for subsite in video.subsites %}{{ subsite.subsite.name }}{% if loop.last and not video.isVaria %}{% else %}, {% endif %}{% endfor %}{% if video.isVaria %}{{ 'tv_varia_tekst' | trans }}{% endif %}</span>
  114.                                 </div>
  115.                             </a>
  116.                         </div>
  117.                         {% endfor %}
  118.                     </div>
  119.                 </div>
  120.             </section>
  121.             {# dynamische cms modules #}
  122.             {{ include('@NotarisFrontend/module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
  123.         </div>
  124.         <!-- #### CONTENT #### -->
  125.         <!-- modules -->
  126.         {#
  127.            <aside id="content-right">
  128.                {% if notaryId is defined %}
  129.                    {{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
  130.                {% else %}
  131.                    {{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
  132.                {% endif %}
  133.                <div class="cleaner">&nbsp;</div>
  134.            </aside>
  135.         #}
  136.         {% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': subsite.slug, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
  137.     </section>
  138. {% endblock %}
  139. {% block extrajs %}
  140.     <script>
  141.         //adresbook();
  142.         $(document).ready(function(){
  143.             $('.info-news-content a.relvid').click(function(e){
  144.                 e.preventDefault();
  145.                 var href = $(this).attr('href');
  146.                 var slug = $(this).attr('data-slug');
  147.                 $.getJSON('{{ path('notaris_frontend_tv_clicked') }}/' + slug, function(result){
  148.                     window.location.href = href;
  149.                 });
  150.             });
  151.         });
  152.         /*function onYouTubeIframeAPIReady() {
  153.             {% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
  154.                 var path = '{{ video.asset.assetVideopaths[0].videopath.youtube }}';
  155.                 var player = new YT.Player('youtube_' + path, {
  156.                     height: '250',
  157.                     width: '490',
  158.                     videoId: path,
  159.                 });
  160.             {% endif %}
  161.         }
  162.         var tag = document.createElement('script');
  163.         tag.src = "https://www.youtube.com/iframe_api";
  164.         var firstScriptTag = document.getElementsByTagName('script')[0];
  165.         firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);*/
  166.     </script>
  167.     <script src="/js/video.js"></script>
  168.     <script>
  169.         videojs.options.flash.swf = "/js/video-js.swf";
  170.     </script>
  171. {% endblock %}