{% extends '@NotarisFrontend/layout2017.html.twig' %}
{% if notaryId is defined %}
{% set headTitle = info.header1 | replace({"<BR />":" "}) ~ ' - ' ~ subsite.pageTitle %}
{% else %}
{% set headTitle = subsite.pageTitle %}
{% if section.meta.ogTitle and section.parent and section.parent.meta.ogTitle %}
{% set headTitle = section.meta.ogTitle | trans ~ " | " ~ section.parent.meta.ogTitle | trans %}
{% endif %}
{% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}
{% endif %}
{% set linked_url_nl = url_nl ~ path('notaris_frontend_tv') %}
{% set linked_url_fr = url_fr ~ path('notaris_frontend_tv') %}
{% block title %}
<title>{{ headTitle }}</title>
{% endblock %}
{% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_tv_detail_video', {slug: pageslug, slugvideo: video.slug}) %}
{% block extralinks %}
<link rel="canonical" href="{{ canonicalLink }}" />
{% endblock %}
{% block extrameta %}
<meta name="keywords" content="{{ section.meta.metaKeywords }}"/>
<meta name="description" lang="{{ locale }}" content="{{ section.meta.metaDescription }}"/>
<meta property="og:title" content="{{ 'tv_notaris' | trans | raw }} - {{ video.title }}" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="{{ canonicalLink }}" />
{% if video.meta.ogDescription %}
<meta property="og:description" content="{{ video.meta.ogDescription }}" />
{% endif %}
{% if shareImageVideo %}
<meta property="og:image" content="{{ shareImageVideo }}" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block body %}
<section class="content u-padding-top-large">
{{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
<div id="content-center" class="content-center-large standard">
<div id="content-center-header">
<article class="niveau3">
<div class="article-content">
<h2 class="u-text-lineheight-semilarge u-h2@desktop">{{ 'tv_notaris' | trans | raw }} - {{ video.title }}</h2>
</div>
</article>
</div>
<section id="info" class="no-margin">
<div id="info-content" class="niveau1 info-news-content">
<article>
{#{% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
<div id="youtube_{{ video.asset.assetVideopaths[0].videopath.youtube }}"></div>
{% else %}
{% set poster = "" %}
{% if video.asset.assetImages | length > 0 %}
{% set poster = '/uploads/' ~ locale ~ video.asset.assetImages[0].image.filename %}
{% endif %}
<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="{}">
<source src="/video/{{ locale }}/{{ video.asset.assetVideopaths[0].videopath.path }}" type="video/mp4" >
</video>
{% endif %}#}
{% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
<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>
{% else %}
{% set poster = "" %}
{% if video.asset.assetImages | length > 0 %}
{% set poster = '/uploads/' ~ locale ~ video.asset.assetImages[0].image.filename %}
{% endif %}
<video class="o-tabpannel__content__video js-tabpannel-video u-margin-bottom-small" controls preload="auto" poster="{{ poster }}" width="100%" height="300">
<source src="/video/{{ locale }}/{{ video.asset.assetVideopaths[0].videopath.path }}">
</video>
{% endif %}
<h2>{{ video.publicationDate | localdate }}</h2>
</article>
{% if video.tags | length > 0 %}
{#<article class="tags">
<p>
{% for tag in video.tags %}
<a data-slug="{{ tag.slug }}" href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}" title="{{ tag.name }}">{{ tag.name }}</a>
{% endfor %}
</p>
<div class="cleaner"> </div>
</article>#}
<div class="c-tags u-margin-top-small u-padding-left-small u-padding-right-small js-tags">
{% for tag in video.tags %}
<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>
{% endfor %}
</div>
<div class="c-divider c-divider--light"> </div>
{% endif %}
<div class="c-movies">
<article class="u-no-border">
<h1>{{ 'tv_gerelateerd' | trans | raw }}</h1>
</article>
{% for video in randomvideos %}
<div class="c-movies__item">
<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 }}">
{% if video.asset.assetImages | length > 0 %}
{% set image_path = 'uploads/'~ locale ~ '/' ~ video.asset.assetImages[0].image.filename %}
{{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}) }}
{% endif %}
<div class="c-movies__overlay">
<div class="o-grid__item__overlay__title c-movies__info">
<h3 class="u-h4">{{ video.title }}</h3>
</div>
<button class="c-btn c-btn--icon c-btn--icon--large c-btn__play">
<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>
</button>
</div>
<div class="c-movies__info-back">
<span class="c-movies__meta">{{ video.publicationDate | localdate }}</span><br>
<span class="c-movies__meta c-movies__meta--theme">{{ 'tv_rubriek'|trans }}:</span>
<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>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{# dynamische cms modules #}
{{ include('@NotarisFrontend/module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
</div>
<!-- #### CONTENT #### -->
<!-- modules -->
{#
<aside id="content-right">
{% if notaryId is defined %}
{{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
{% else %}
{{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
{% endif %}
<div class="cleaner"> </div>
</aside>
#}
{% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': subsite.slug, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
</section>
{% endblock %}
{% block extrajs %}
<script>
//adresbook();
$(document).ready(function(){
$('.info-news-content a.relvid').click(function(e){
e.preventDefault();
var href = $(this).attr('href');
var slug = $(this).attr('data-slug');
$.getJSON('{{ path('notaris_frontend_tv_clicked') }}/' + slug, function(result){
window.location.href = href;
});
});
});
/*function onYouTubeIframeAPIReady() {
{% if video.asset.assetVideopaths[0].videopath.youtube != '' %}
var path = '{{ video.asset.assetVideopaths[0].videopath.youtube }}';
var player = new YT.Player('youtube_' + path, {
height: '250',
width: '490',
videoId: path,
});
{% endif %}
}
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);*/
</script>
<script src="/js/video.js"></script>
<script>
videojs.options.flash.swf = "/js/video-js.swf";
</script>
{% endblock %}