<!-- NIEUWS - TABPANNEL -->
<!-- @NOTE: toevoegen van o-tabpannel--themed voor ander kleur dan grijs -->
{% if locale == 'nl' %}
{% set notarisslug = 'notaris' %}
{% else %}
{% set notarisslug = 'notaire' %}
{% endif %}
<div id="news" class="o-tabpannel u-clearfix js-tabpannel" data-type="news">
<div class="o-tabpannel__navigation">
<a href="{{ path('notaris_frontend_news') }}" class="c-links__item c-btn c-btn--full u-text-left u-bg-primary o-tabpannel--themed u-margin-bottom-none js-fednotlink">
<h2 class="u-h4 c-links__title u-text-upper u-color-white u-text-bold u-margin-bottom-none">{{ "mn_nieuws_sven" | trans }}</h2>
<img src="/assets/images/icons/icon-news.svg" alt="{{ "mn_nieuws_sven" | trans }}">
</a>
<div class="o-tabpannel__navigation__items">
{% for newsitem in news %}
<a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}" data-index="{{loop.index0}}" title="{{ newsitem.title }}" class="o-tabpannel__item o-tabpannel__item--nohovermobile u-color-black {% if loop.first %}active{% endif %} js-tabpannel-navigation">
<small>{{ newsitem.publicationDate | localdate }}</small>
<h2 class="u-h3">
{% if newsitem.isPers %}
<div class="c-tooltip c-tooltip--top-to-right u-text-inline">
<span class="u-bg-primary u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
<p class="c-tooltip__news">{{ 'nw_pm_meaning' | trans }}</p>
</div>
{% endif %}
{{ newsitem.title }}
</h2>
</a>
{% endfor %}
<a href="#!" title="{{ "nw_nieuwsbrief" | trans | capitalize }}" class="o-flag c-btn c-btn--tiny c-btn--secondary c-btn--icon o-flag--flush u-margin-top-tiny js-modal-navigation" data-modal="subscribe-newsletter">
<span class="o-flag__body">{{ "nw_nieuwsbrief" | trans | upper }}</span>
</a>
{# <a href="#" title="RSS" target="_blank" target="_blank" class="o-flag c-btn c-btn--tiny c-btn--light c-btn--icon o-flag--flush u-margin-top-tiny">
<figure class="o-flag__img u-padding-right-tiny">
<?xml version="1.0" encoding="utf-8"?>
<svg class="u-color-path-rss" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1344q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm512 123q2 28-17 48-18 21-47 21h-135q-25 0-43-16.5t-20-41.5q-22-229-184.5-391.5t-391.5-184.5q-25-2-41.5-20t-16.5-43v-135q0-29 21-47 17-17 43-17h5q160 13 306 80.5t259 181.5q114 113 181.5 259t80.5 306zm512 2q2 27-18 47-18 20-46 20h-143q-26 0-44.5-17.5t-19.5-42.5q-12-215-101-408.5t-231.5-336-336-231.5-408.5-102q-25-1-42.5-19.5t-17.5-43.5v-143q0-28 20-46 18-18 44-18h3q262 13 501.5 120t425.5 294q187 186 294 425.5t120 501.5z" fill="true"/></svg>
</figure>
<span class="o-flag__body u-color-rss">RSS</span>
</a> #}
</div>
</div>
<div class="o-tabpannel__content u-hidden@mobile">
{% for newsitem in news %}
<div class="o-tabpannel__content__body{% if loop.first %} active{% endif %} u-wysiwyg js-tabpannel-content">
<div class="o-tabpannel__content__body--max">
<div class="o-tabpannel__content__title">
{# <h3 class="u-h2 u-margin-bottom-tiny u-text-lineheight-normal o-tabpannel__content__labelwrapper">
{% if newsitem.isPers %}
<span class="u-bg-primary u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
<span class="o-tabpannel__label--fake"> </span>
{% endif %}
{{ newsitem.title }}
</h3> #}
<h1 class="u-h2 u-margin-bottom-tiny u-text-lineheight-semilarge o-tabpannel__content__labelwrapper">
{% if newsitem.isPers %}
<div class="c-tooltip c-tooltip--bottom-to-right u-text-inline">
<span class="u-bg-primary u-color-white o-tabpannel__label c-tooltip__label">{{ 'nw_pm' | trans }}</span>
<p class="c-tooltip__news u-color-white">{{ 'nw_pm_meaning' | trans }}</p>
</div>
{% endif %}
{{ newsitem.title }}
</h1>
<p class="o-tabpannel__content__title__date">{{ newsitem.publicationDate | localdate }}</p>
{% if newsitem.introduction != '' %}
<p>{{ newsitem.introduction }}</p>
{% endif %}
{% if newsitem.subtitle != '' %}
<h2 class="u-h4">{{ newsitem.subtitle }}</h2>
{% endif %}
</div>
{#1 afbeelding met tekst#}
{% if newsitem.asset is not null %}
{% if newsitem.asset.assetImages is not null %}
{% if newsitem.asset.assetImages | length == 1 and newsitem.text != '' %}
{% set image = newsitem.asset.assetImages[0] %}
{% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
{#<a href="/{{image_path}}" {% if image.image.caption is not null %}title="{{image.image.caption}}" {% endif %}rel="js-fancybox-{{newsitem.id}}" class="o-tabpannel__content__imagelink js-fancybox">#}
<a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}" class="o-tabpannel__content__imagelink">
{{ image_path | responsive_image_source([301,238], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 301px, (min-width: 768px and max-width: 960px) 238px', 'alt': image.image.alt}) }}
</a>
{% endif %}
{% endif %}
{% endif %}
{{ newsitem.text | raw }}
{#reeks afbeeldingen#}
{% if newsitem.asset is not null %}
{% if newsitem.asset.assetImages is not null %}
{% if not(newsitem.asset.assetImages | length == 1 and newsitem.text != '') %}
{% for image in newsitem.asset.assetImages %}
{% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
{#<a href="/{{image_path}}" {% if image.image.caption is not null %}title="{{image.image.caption}}" {% endif %}rel="js-fancybox-{{newsitem.id}}" class="js-fancybox u-display--inlineblock u-margin-bottom-small">#}
<a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}">
{{ image_path | responsive_image_source([710,477], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 710px, (min-width: 768px and max-width: 960px) 477px', 'alt': image.image.alt}) }}
{% if image.image.caption is not null %}
<p class="u-margin-top-tiny">{{ image.image.caption }}</p>
{% endif %}
</a>
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% if newsitem.asset is not null and newsitem.asset.assetVideoPaths | length > 0 %}
<div>
{% for video in newsitem.asset.assetVideoPaths %}
{% if video.videoPath.youtube is not null and video.videoPath.youtube != '' %}
<a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}">
<img class="youtube-thumb" src="https://img.youtube.com/vi/{{ video.videoPath.youtube |replace({'/': '' }) }}/maxresdefault.jpg">
</a>
{#<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="https://www.youtube-nocookie.com/embed/{{ video.videoPath.youtube }}?enablejsapi=1&widgetid=1&rel=0" kwframeid="2"></iframe>#}
{% endif %}
{% if video.videoPath.path is not null and video.videoPath.path != '' %}
<video class="o-tabpannel__content__video js-tabpannel-video u-margin-bottom-small" controls>
<source src="/video/{{ locale }}/{{ video.videoPath.path }}">
</video>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if newsitem.asset and (newsitem.asset.assetLinks | length > 0 or newsitem.asset.assetAttachments | length > 0) %}
<ul class="u-margin-bottom-small">
{% for link in newsitem.asset.assetLinks %}
<li><a href="{{ link.link.url }}" title="{{ link.link.title }}" {% if link.link.newWindow %}target="_blank"{% endif %}>{{ link.link.title }}</a></li>
{% endfor %}
{% for attachment in newsitem.asset.assetAttachments %}
{% set fileType = attachment.attachment.filename | split('.') %}
{% set fileType = fileType | last | upper %}
{% set title = attachment.attachment.title %}
{% if title == '' %}
{% set title = attachment.attachment.originalFilename %}
{% endif %}
{% set foo = attachment.attachment.filename|split('/', 2) %}
{% if foo | length >= 1 %}{% set filename = foo[1] %}{% endif %}
{% if filename is defined %}
<li><a href="/download/{{ filename | url_encode }}" title="{{ title }}">{{ title }} ({{ fileType }} {{ attachment.attachment.byte | bfos_format_bytes | replace({'.':','}) }})</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if newsitem.tags | length > 0 %}
<div class="c-tags u-margin-top-small js-tags">
{% for tag in newsitem.tags %}
<a data-slug="{{ tag.slug }}" data-tag-clicked="{{ path('notaris_frontend_tag_clicked') }}" href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}" title="{{ tag.name }}" class="c-tags__item"><small>{{ tag.name }}</small></a>
{% endfor %}
</div>
{% endif %}
{% if newsitem.source != '' %}
<p class="u-margin-top-tiny">{{ 'nw_bron' | trans }}: {{ newsitem.source }}</p>
{% endif %}
{% if newsitem.author != '' %}
<p class="u-margin-top-tiny">Auteur: {{ newsitem.author }}</p>
{% endif %}
</div>
{#<div class="o-tabpannel__more u-text-center">#}
{#<a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}" class="o-tabpannel__more__button c-btn--empty u-margin-left-auto u-margin-right-auto js-tabpannel-more">#}
{#<img src="/assets/images/font-awesome-svg/angle-down.svg" alt="{{ 'home_meer_nieuws' | trans }}"/>#}
{#</a>#}
{#</div>#}
<div class="o-tabpannel__content__readmore">
<a class="o-flag c-btn c-btn--tiny c-btn--primary c-btn--icon o-flag--flush u-margin-top-tiny u-color-white" href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}">{{ 'nw_read_more' | trans }}</a>
</div>
</div>
{% endfor %}
</div>
<div class="c-popup c-popup--newsletter js-modal js-modal-newsletter" id="subscribe-newsletter">
<div class="c-popup__wrapper">
<div class="c-popup__close c-popup__close--border u-text-right">
<button class="js-modal-close c-btn--empty c-btn__close">
</button>
</div>
<div class="c-popup__body">
{{ include('@NotarisFrontend/module/mod_subscription.html.twig', {'extralink': true}) }}
</div>
</div>
</div>
</div>
<div class="c-divider"> </div>