src/Notaris/FrontendBundle/Resources/views/module/mod_news.html.twig line 1

Open in your IDE?
  1. <!-- NIEUWS - TABPANNEL -->
  2. <!-- @NOTE: toevoegen van o-tabpannel--themed voor ander kleur dan grijs -->
  3. {% if locale == 'nl' %}
  4.     {% set notarisslug = 'notaris' %}
  5. {% else %}
  6.     {% set notarisslug = 'notaire' %}
  7. {% endif %}
  8. <div id="news" class="o-tabpannel u-clearfix js-tabpannel" data-type="news">
  9.     <div class="o-tabpannel__navigation">
  10.         <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">
  11.             <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>
  12.             <img src="/assets/images/icons/icon-news.svg" alt="{{ "mn_nieuws_sven" | trans }}">
  13.         </a>
  14.         <div class="o-tabpannel__navigation__items">
  15.             {% for newsitem in news %}
  16.                 <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">
  17.                     <small>{{ newsitem.publicationDate | localdate }}</small>
  18.                     <h2 class="u-h3">
  19.                         {% if newsitem.isPers %}
  20.                             <div class="c-tooltip c-tooltip--top-to-right u-text-inline">
  21.                                 <span class="u-bg-primary u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
  22.                                 <p class="c-tooltip__news">{{ 'nw_pm_meaning' | trans }}</p>
  23.                             </div>
  24.                         {% endif %}
  25.                         {{ newsitem.title }}
  26.                     </h2>
  27.                 </a>
  28.             {% endfor %}
  29.             <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">
  30.                 <span class="o-flag__body">{{ "nw_nieuwsbrief" | trans | upper }}</span>
  31.             </a>
  32.             {# <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">
  33.                 <figure class="o-flag__img u-padding-right-tiny">
  34.                     <?xml version="1.0" encoding="utf-8"?>
  35.                     <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>
  36.                 </figure>
  37.                 <span class="o-flag__body u-color-rss">RSS</span>
  38.             </a> #}
  39.         </div>
  40.     </div>
  41.     <div class="o-tabpannel__content u-hidden@mobile">
  42.         {% for newsitem in news %}
  43.             <div class="o-tabpannel__content__body{% if loop.first %} active{% endif %} u-wysiwyg js-tabpannel-content">
  44.                 <div class="o-tabpannel__content__body--max">
  45.                     <div class="o-tabpannel__content__title">
  46.                         {# <h3 class="u-h2 u-margin-bottom-tiny u-text-lineheight-normal o-tabpannel__content__labelwrapper">
  47.                             {% if newsitem.isPers %}
  48.                                 <span class="u-bg-primary u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
  49.                                 <span class="o-tabpannel__label--fake">&nbsp;</span>
  50.                             {% endif %}
  51.                             {{ newsitem.title }}
  52.                         </h3> #}
  53.                         <h1 class="u-h2 u-margin-bottom-tiny u-text-lineheight-semilarge o-tabpannel__content__labelwrapper">
  54.                             {% if newsitem.isPers %}
  55.                                 <div class="c-tooltip c-tooltip--bottom-to-right u-text-inline">
  56.                                     <span class="u-bg-primary u-color-white o-tabpannel__label c-tooltip__label">{{ 'nw_pm' | trans }}</span>
  57.                                     <p class="c-tooltip__news u-color-white">{{ 'nw_pm_meaning' | trans }}</p>
  58.                                 </div>
  59.                             {% endif %}
  60.                             {{ newsitem.title }}
  61.                         </h1>
  62.                         <p class="o-tabpannel__content__title__date">{{ newsitem.publicationDate | localdate }}</p>
  63.                         {% if newsitem.introduction != '' %}
  64.                             <p>{{ newsitem.introduction }}</p>
  65.                         {% endif %}
  66.                         {% if newsitem.subtitle != '' %}
  67.                             <h2 class="u-h4">{{ newsitem.subtitle }}</h2>
  68.                         {% endif %}
  69.                     </div>
  70.                     {#1 afbeelding met tekst#}
  71.                     {% if newsitem.asset is not null %}
  72.                         {% if newsitem.asset.assetImages is not null %}
  73.                             {% if newsitem.asset.assetImages | length == 1 and newsitem.text != '' %}
  74.                                 {% set image = newsitem.asset.assetImages[0] %}
  75.                                 {% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
  76.                                 {#<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">#}
  77.                                 <a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}" class="o-tabpannel__content__imagelink">
  78.                                     {{ 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}) }}
  79.                                 </a>
  80.                             {% endif %}
  81.                         {% endif %}
  82.                     {% endif %}
  83.                     {{ newsitem.text | raw }}
  84.                     {#reeks afbeeldingen#}
  85.                     {% if newsitem.asset is not null %}
  86.                         {% if newsitem.asset.assetImages is not null %}
  87.                             {% if not(newsitem.asset.assetImages | length == 1 and newsitem.text != '') %}
  88.                                 {% for image in newsitem.asset.assetImages %}
  89.                                     {% set image_path = 'uploads/'~ image.image.locale  ~ image.image.filename %}
  90.                                     {#<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">#}
  91.                                     <a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}">
  92.                                         {{ 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}) }}
  93.                                         {% if image.image.caption is not null %}
  94.                                             <p class="u-margin-top-tiny">{{ image.image.caption }}</p>
  95.                                         {% endif %}
  96.                                     </a>
  97.                                 {% endfor %}
  98.                             {% endif %}
  99.                         {% endif %}
  100.                     {% endif %}
  101.                     {% if newsitem.asset is not null and newsitem.asset.assetVideoPaths | length > 0 %}
  102.                         <div>
  103.                             {% for video in newsitem.asset.assetVideoPaths %}
  104.                                 {% if video.videoPath.youtube is not null and video.videoPath.youtube != '' %}
  105.                                     <a href="{{ path('notaris_frontend_news_detail', { 'slug': newsitem.slug} ) }}">
  106.                                         <img class="youtube-thumb" src="https://img.youtube.com/vi/{{ video.videoPath.youtube |replace({'/': '' }) }}/maxresdefault.jpg">
  107.                                     </a>
  108.                                     {#<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>#}
  109.                                 {% endif %}
  110.                                 {% if video.videoPath.path is not null and video.videoPath.path != '' %}
  111.                                     <video class="o-tabpannel__content__video js-tabpannel-video u-margin-bottom-small" controls>
  112.                                         <source src="/video/{{ locale }}/{{ video.videoPath.path }}">
  113.                                     </video>
  114.                                 {% endif %}
  115.                             {% endfor %}
  116.                         </div>
  117.                     {% endif %}
  118.                     {% if newsitem.asset and (newsitem.asset.assetLinks | length > 0 or newsitem.asset.assetAttachments | length > 0) %}
  119.                         <ul class="u-margin-bottom-small">
  120.                             {% for link in newsitem.asset.assetLinks %}
  121.                                 <li><a href="{{ link.link.url }}" title="{{ link.link.title }}" {% if link.link.newWindow %}target="_blank"{% endif %}>{{ link.link.title }}</a></li>
  122.                             {% endfor %}
  123.                             {% for attachment in newsitem.asset.assetAttachments %}
  124.                                 {% set fileType = attachment.attachment.filename | split('.') %}
  125.                                 {% set fileType = fileType | last | upper %}
  126.                                 {% set title = attachment.attachment.title %}
  127.                                 {% if title == '' %}
  128.                                     {% set title = attachment.attachment.originalFilename %}
  129.                                 {% endif %}
  130.                                 {% set foo = attachment.attachment.filename|split('/', 2) %}
  131.                                 {% if foo | length >= 1 %}{% set filename = foo[1] %}{% endif %}
  132.                                 {%  if filename is defined %}
  133.                                 <li><a href="/download/{{ filename | url_encode }}" title="{{ title }}">{{ title }} ({{ fileType  }} {{ attachment.attachment.byte | bfos_format_bytes | replace({'.':','}) }})</a></li>
  134.                                 {% endif %}
  135.                             {% endfor %}
  136.                         </ul>
  137.                     {% endif %}
  138.                     {% if newsitem.tags | length > 0 %}
  139.                         <div class="c-tags u-margin-top-small js-tags">
  140.                             {% for tag in newsitem.tags %}
  141.                                 <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>
  142.                             {% endfor %}
  143.                         </div>
  144.                     {% endif %}
  145.                     {% if newsitem.source != '' %}
  146.                         <p class="u-margin-top-tiny">{{ 'nw_bron' | trans }}: {{ newsitem.source }}</p>
  147.                     {% endif %}
  148.                     {% if newsitem.author != '' %}
  149.                         <p class="u-margin-top-tiny">Auteur: {{ newsitem.author }}</p>
  150.                     {% endif %}
  151.                 </div>
  152.                 {#<div class="o-tabpannel__more u-text-center">#}
  153.                     {#<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">#}
  154.                         {#<img src="/assets/images/font-awesome-svg/angle-down.svg" alt="{{ 'home_meer_nieuws' | trans }}"/>#}
  155.                     {#</a>#}
  156.                 {#</div>#}
  157.                 <div class="o-tabpannel__content__readmore">
  158.                     <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>
  159.                 </div>
  160.             </div>
  161.         {% endfor %}
  162.     </div>
  163.     <div class="c-popup c-popup--newsletter js-modal js-modal-newsletter" id="subscribe-newsletter">
  164.         <div class="c-popup__wrapper">
  165.             <div class="c-popup__close c-popup__close--border u-text-right">
  166.                 <button class="js-modal-close c-btn--empty c-btn__close">
  167.                 </button>
  168.             </div>
  169.             <div class="c-popup__body">
  170.                 {{ include('@NotarisFrontend/module/mod_subscription.html.twig', {'extralink': true}) }}
  171.             </div>
  172.         </div>
  173.     </div>
  174. </div>
  175. <div class="c-divider">&nbsp;</div>