templates/Nordinfo/Main/parts/item_list_agenda.html.twig line 1

Open in your IDE?
  1. {% set date = "" %}
  2. {% if post['date_debut'] is defined and post['date_debut'] is not null %}
  3.   {% set date_segments = post['date_debut'] | split('/') %}
  4.   {% set date = date_segments[1] ~ '/' ~ date_segments[0] ~ '/' ~ date_segments[2] %}
  5. {% endif %}
  6. {% set date_fin = "" %}
  7. {% if post['date_fin'] is defined and post['date_fin'] != null %}
  8.   {% set date_segmentss = post['date_fin'] | split('/') %}
  9.   {% set date_fin = date_segmentss[1] ~ '/' ~ date_segmentss[0] ~ '/' ~ date_segmentss[2] %}
  10. {% endif %}
  11. {% set is_vip = false %}
  12. {% set is_presse = false %}
  13. {% set is_locked = false %}
  14. {% if post['publics'] is defined %}
  15.   {% for target in post['publics'] %}
  16.     {% if target['id'] == 2 or target['id'] == 3 %}
  17.       {% set is_locked = true %}
  18.     {% endif %}
  19.   {% endfor %}
  20. {% endif %}
  21. {% if main_type is not defined %}
  22.   {% set main_type = 'all' %}
  23. {% endif %}
  24. {% if is_locked == false or is_locked == true and main_type != 'folder' %}
  25.   {% if post['type']['type'] is defined %}
  26.     {% if post['type']['type'] == 'video' %}
  27.       {% if actus == true and post['bool_actu'] == true or actus == false %}
  28.         <div class="colArticleItem col-item">
  29.           <p class="sr-only"
  30.              style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  31.              id="list-item-{{ post['id'] }}"
  32.              data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  33.           <a
  34.             href="{{ path('video_detail', {"slug": post['slug']}) }}"
  35.             class="articleItem _video {% if is_locked is defined and is_locked == true %}_locked{% endif %}">
  36.                 <span class="__lock">
  37.                     {{ source('svg/lock.svg') }}
  38.                 </span>
  39.             <div class="__img lozad"
  40.                  data-background-image="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% else %}{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% endif %}">
  41.               <p class="__tag">
  42.                 VIDÉO &nbsp;&nbsp;
  43.                 <span>{{ post['duree'] }}</span>
  44.               </p>
  45.               <button class="__button-remove" id="btnRemove{{ post['id'] }}" data-remove-item="{{ post['id'] }}"
  46.                       title="Retirer des favoris">
  47.                 <svg aria-hidden="true" focusable="false" data-name="Calque 1"
  48.                      xmlns="http://www.w3.org/2000/svg" viewbox="0 0 283.5 283.5">
  49.                   <path class=""
  50.                         d="M240.9,42.5a140.29,140.29,0,1,0,0,198.4C295.7,186.2,295.7,97.3,240.9,42.5ZM176.5,182.7,141.7,148,107,182.8l-6.3-6.3,34.8-34.8L100.7,107l6.3-6.3,34.8,34.8,34.8-34.8,6.3,6.3L148,141.7l34.8,34.8Z"/>
  51.                 </svg>
  52.                 <span class="sr-only">Retirer des favoris</span>
  53.               </button>
  54.             </div>
  55.             <h2 class="__title">
  56.               <span>{{ post['title'] }}</span>
  57.             </h2>
  58.           </a>
  59.         </div>
  60.       {% endif %}
  61.     {% elseif post['type']['type'] == 'event' %}
  62.       <div class="colArticleItem col-item">
  63.         <p class="sr-only"
  64.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  65.            id="list-item-{{ post['id'] }}"
  66.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  67.         <a {% if post['musee_name'] != null %} target="_blank" {% endif %}
  68.           href="{% if post['musee_name'] != null %}{{ post['url1'] }}{% else %}{{ path('post_detail', {"slug": post['slug']}) }}{% endif %}"
  69.           class="articleItem _short _event {% if is_locked is defined and is_locked == true %}_locked{% endif %}">
  70.             <span class="__lock">
  71.                 {{ source('svg/lock.svg') }}
  72.             </span>
  73.           <div class="row">
  74.             <div class="col-auto pr-0">
  75.               <div
  76.                 class="__img --event placement{% if post['position_image']['id'] is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  77.                 data-background-image="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% elseif post['musee_name'] != null or post['image_url'] %}{{ post['image_url'] }}{% else %}{% if post['illustrationfil_name'] is not null %}
  78.                  {{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% else %}{{ post['thumb_url'] }}{% endif %}{% endif %}"
  79.               >
  80.                 <button class="__button-remove" id="btnRemove{{ post['id'] }}" data-remove-item="{{ post['id'] }}"
  81.                         title="Retirer des favoris">
  82.                   <svg aria-hidden="true" focusable="false" data-name="Calque 1"
  83.                        xmlns="http://www.w3.org/2000/svg" viewbox="0 0 283.5 283.5">
  84.                     <path class=""
  85.                           d="M240.9,42.5a140.29,140.29,0,1,0,0,198.4C295.7,186.2,295.7,97.3,240.9,42.5ZM176.5,182.7,141.7,148,107,182.8l-6.3-6.3,34.8-34.8L100.7,107l6.3-6.3,34.8,34.8,34.8-34.8,6.3,6.3L148,141.7l34.8,34.8Z"/>
  86.                   </svg>
  87.                   <span class="sr-only">Retirer des favoris</span>
  88.                 </button>
  89.               </div>
  90.             </div>
  91.             <div class="col">
  92.               <h2 class="__title">
  93.                 <span>{{ post['title'] }}</span>
  94.               </h2>
  95.               {% if post['subtitle']|length > 0 %}
  96.                 <p class="__desc">
  97.                   {{ post['subtitle'] }}
  98.                 </p>
  99.               {% endif %}
  100.               <p class="__date">
  101.                 {% if date == date_fin %}
  102.                   Le
  103.                   {{ date|format_datetime(locale='fr', pattern='d MMMM Y') }}
  104.                 {% else %}
  105.                   Du
  106.                   {% if date_fin|format_datetime(locale='fr', pattern="Y") == date|format_datetime(locale='fr', pattern="Y") %}
  107.                     {% if date|format_datetime(locale='fr', pattern="M") ==  date_fin|format_datetime(locale='fr', pattern="M") %}
  108.                       {{ date|format_datetime(locale='fr', pattern="d") }}
  109.                     {% else %}
  110.                       {{ date|format_datetime(locale='fr', pattern="d MMMM") }}
  111.                     {% endif %}
  112.                   {% else %}
  113.                     {{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}
  114.                   {% endif %}
  115.                   {# { post['date_debut']|format_datetime('none', 'none', app.request.locale, 'Europe/Paris', 'd MMMM') } #}
  116.                   au
  117.                   {{ date_fin|format_datetime(locale='fr', pattern="d MMMM Y") }}
  118.                   {# { post['date_fin']|format_datetime('none', 'none', app.request.locale, 'Europe/Paris','d MMMM Y') } #}
  119.                 {% endif %}
  120.               </p>
  121.                 {% if post['event_lieu']|length > 0 or post['event_ville']|length > 0 %}
  122.                   <p class="__place">
  123.                     <span class="__lieu">{{ post['event_lieu'] }}</span>
  124.                     {% if post['event_lieu'] is not null and post['event_ville'] is not null %}
  125.                       <span class="separator">|</span>
  126.                     {% endif %}
  127.                     <span class="__ville">{{ post['event_ville'] }}</span>
  128.                   </p>
  129.                 {% endif %}
  130.             </div>
  131.           </div>
  132.         </a>
  133.       </div>
  134.     {% elseif post['type']['type'] == 'folder' %}
  135.       <div class="colArticleItem col-item">
  136.         <p class="sr-only"
  137.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  138.            id="list-item-{{ post['id'] }}"
  139.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  140.         <a
  141.           href="{{ path('post_detail', {"slug": post['slug']}) }}"
  142.           class="articleItem _background {% if is_locked is defined and is_locked == true %}_locked{% endif %}">
  143.             <span class="__lock">
  144.         {{ source('svg/lock.svg') }}
  145.         </span>
  146.           <div
  147.             class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  148.             data-background-image="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% else %}{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% endif %}"></div>
  149.           <div class="__info-wrapper"
  150.                {% if post['palettecouleur'] is defined %}style="background-color: {{ post['palettecouleur']['code_hexa'] }};" {% endif %}>
  151.             <h2 class="__title">
  152.               <span>{{ post['title'] }}</span>
  153.             </h2>
  154.             {% if post['subtitle']|length > 0 %}
  155.               <p class="__desc">{{ post['subtitle'] }}</p>
  156.             {% endif %}
  157.           </div>
  158.         </a>
  159.       </div>
  160.     {% elseif post['type']['type'] == 'article' %}
  161.       <div class="colArticleItem col-item">
  162.         <p class="sr-only"
  163.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  164.            id="list-item-{{ post['id'] }}"
  165.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  166.         <a
  167.           href="{{ path('post_detail', {"slug": post['slug']}) }}"
  168.           class="articleItem _article {% if post['grand_format'] != 1 %}_short{% endif %} {% if is_locked is defined and is_locked == true %}_locked{% endif %}">
  169.         <span class="__lock">
  170.         {{ source('svg/lock.svg') }}
  171.         </span>
  172.           <div class="__inner">
  173.             <div class="__col-img">
  174.               <div
  175.                 class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  176.                 data-background-image="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% else %}{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% endif %}">
  177.                 <button class="__button-remove" id="btnRemove{{ post['id'] }}" data-remove-item="{{ post['id'] }}"
  178.                         title="Retirer des favoris">
  179.                   <svg aria-hidden="true" focusable="false" data-name="Calque 1"
  180.                        xmlns="http://www.w3.org/2000/svg" viewbox="0 0 283.5 283.5">
  181.                     <path class=""
  182.                           d="M240.9,42.5a140.29,140.29,0,1,0,0,198.4C295.7,186.2,295.7,97.3,240.9,42.5ZM176.5,182.7,141.7,148,107,182.8l-6.3-6.3,34.8-34.8L100.7,107l6.3-6.3,34.8,34.8,34.8-34.8,6.3,6.3L148,141.7l34.8,34.8Z"/>
  183.                   </svg>
  184.                   <span class="sr-only">Retirer des favoris</span>
  185.                 </button>
  186.               </div>
  187.             </div>
  188.             <div class="__col-info">
  189.               <div class="__info-wrapper">
  190.                 <h2 class="__title">
  191.                   <span>{{ post['title'] }}</span>
  192.                 </h2>
  193.                 {% if post['short_description']|length > 0 %}
  194.                   <p class="__desc">
  195.                     {{ post['short_description'] }}
  196.                   </p>
  197.                 {% endif %}
  198.               </div>
  199.             </div>
  200.           </div>
  201.         </a>
  202.       </div>
  203.     {% elseif post['type']['type'] == 'pub' %}
  204.       <div class="colArticleItem col-item">
  205.         <p class="sr-only"
  206.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  207.            id="list-item-{{ post['id'] }}" title="{{ post['subtitle'] }}"
  208.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  209.         {% if post['widthImageFocusPub'] == post['heightImageFocusPub'] %}
  210.           {% set img_padding = 100 %}
  211.         {% else %}
  212.           {% set img_padding = (post['heightImageFocusPub']/post['widthImageFocusPub'])*100 %}
  213.         {% endif %}
  214.         {% if post['related_post1']is not null %}
  215.           <a
  216.             href="{{ path('post_detail', {"slug": post['related_post1']['slug']}) }}"
  217.             class="articleItem _pub {% if false %}_locked{% endif %}" title="{{ post['related_post1']['subtitle'] }}">
  218.           <span class="__lock">
  219.             {{ source('svg/lock.svg') }}
  220.           </span>
  221.             <div
  222.               class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %}"
  223.               style="position:relative;width:100%;padding-bottom:{{ img_padding }}%;">
  224.               <img
  225.                 data-src="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% else %}{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% endif %}"
  226.                 src=""
  227.                 alt="{{ post['subtitle'] }}" class="lozad"
  228.                 style="position:absolute;top:0;left:0;height:100%!important;width:100%!important;">
  229.             </div>
  230.           </a>
  231.         {% else %}
  232.           <a href="{{ post['url1'] }}" target="_blank"
  233.              class="articleItem _pub {% if false %}_locked{% endif %}"
  234.              title="{{ post['subtitle'] }}">
  235.             {% if post['illustrationfil_name']|length > 0 %}
  236.               <div
  237.                 class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %}"
  238.                 style="position:relative;width:100%;padding-bottom:{{ img_padding }}%;">
  239.                 <img
  240.                   data-src="{% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}{{ post['illustrationfil_name'] }}{% else %}{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}{% endif %}"
  241.                   src=""
  242.                   alt="{{ post['subtitle'] }}" class="lozad"
  243.                   style="position:absolute;top:0;left:0;height:100%!important;width:100%!important;">
  244.               </div>
  245.             {% else %}
  246.               <div class="__img"></div>
  247.             {% endif %}
  248.             {% if post['subtitle']|length > 0 %}
  249.               <p class="sr-only">{{ post['subtitle'] }}</p>
  250.             {% endif %}
  251.           </a>
  252.         {% endif %}
  253.       </div>
  254.     {% elseif post['type']['type'] == 'socialpost' %}
  255.       <div class="col-social-post col-item">
  256.         <p class="sr-only"
  257.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  258.            id="list-item-{{ post['id'] }}"
  259.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  260.         <a href="{{ post['url1'] }}" target="_blank"
  261.            class="socialPostItem {% if false %}_locked{% endif %} {% if post['subtitle'] == 'Twitter' %} _twitter {% endif %}{% if post['subtitle'] == 'Facebook' %} _facebook {% endif %}{% if post['subtitle'] == 'Instagram' %} _instagram {% endif %}{% if post['subtitle'] == 'Linkedin' %} _linkedin {% endif %}">
  262.           <h2 class="sr-only">
  263.             <span class="sr-only">{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</span>
  264.             <span>{{ post['title'] }}</span>
  265.             <span>@departement59</span>
  266.           </h2>
  267.           <span class="__lock">
  268.           {{ source('svg/lock.svg') }}
  269.           </span>
  270.           <div class="__header">
  271.             {% if post['subtitle'] == 'Twitter' %}
  272.               <svg alt="Twitter" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg"
  273.                    width="20.119" height="16.337"
  274.                    viewbox="0 0 20.119 16.337">
  275.                 <g id="twitter" transform="translate(56.9)">
  276.                   <path id="Path_58" data-name="Path 58"
  277.                         d="M-38.834,4.6A11.65,11.65,0,0,1-50.57,16.337a11.666,11.666,0,0,1-6.33-1.859,8.222,8.222,0,0,0,.988.065,8.349,8.349,0,0,0,5.134-1.768,4.123,4.123,0,0,1-3.86-2.859,4.953,4.953,0,0,0,.78.078,4.158,4.158,0,0,0,1.079-.143A4.142,4.142,0,0,1-56.094,5.8V5.745a4.156,4.156,0,0,0,1.872.52,4.125,4.125,0,0,1-1.833-3.431A4.217,4.217,0,0,1-55.5.754,11.638,11.638,0,0,0-47,5.069a3.758,3.758,0,0,1-.1-.936A4.124,4.124,0,0,1-42.98,0a4.141,4.141,0,0,1,3.015,1.3A8.453,8.453,0,0,0-37.34.3a4.142,4.142,0,0,1-1.82,2.287,8.59,8.59,0,0,0,2.378-.65,8.713,8.713,0,0,1-2.054,2.144C-38.847,4.25-38.834,4.432-38.834,4.6Z"
  278.                         fill="#fff"/>
  279.                 </g>
  280.               </svg>
  281.               <span class="sr-only">Twitter</span>
  282.             {% endif %}
  283.             {% if post['subtitle'] == 'Facebook' %}
  284.               <svg alt="Facebook" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg"
  285.                    width="11.501" height="21.235"
  286.                    viewbox="0 0 11.501 21.235">
  287.                 <g id="facebook" transform="translate(-20.3 -6.4)">
  288.                   <path id="Path_54" data-name="Path 54"
  289.                         d="M30.442,18.4H27.421l-.012,8.739H23.593L23.6,18.4H21.342a.527.527,0,0,1-.53-.53L20.8,15.049a.537.537,0,0,1,.53-.542h2.263v-2.72c0-3.166,1.926-4.887,4.743-4.887h2.311a.547.547,0,0,1,.542.542V9.813a.539.539,0,0,1-.542.542h-1.42c-1.529,0-1.83.734-1.83,1.806V14.52h3.37a.539.539,0,0,1,.53.6l-.325,2.8A.516.516,0,0,1,30.442,18.4Z"
  290.                         transform="translate(0 0)" fill="#fff" stroke="#18509a" stroke-width="1"/>
  291.                 </g>
  292.               </svg>
  293.               <span class="sr-only">Facebook</span>
  294.             {% endif %}
  295.             {% if post['subtitle'] == 'Instagram' %}
  296.               <svg alt="Facebook" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg"
  297.                    xmlns:xlink="http://www.w3.org/1999/xlink" width="18.022" height="18" viewbox="0 0 18.022 18">
  298.                 <defs>
  299.                   <radialGradient id="radial-gradient" cx="105.069" cy="44.509" r="20.34"
  300.                                   gradienttransform="translate(-0.001 0.001)" gradientunits="userSpaceOnUse">
  301.                     <stop offset="0" stop-color="#ffed75"/>
  302.                     <stop offset="0.31" stop-color="#e87706"/>
  303.                     <stop offset="0.571" stop-color="#dc1417"/>
  304.                     <stop offset="0.828" stop-color="#b14d90"/>
  305.                     <stop offset="1" stop-color="#413b89"/>
  306.                   </radialGradient>
  307.                   <radialGradient id="radial-gradient-2" cx="-0.069" cy="19.376" r="20.363"
  308.                                   gradienttransform="translate(0 0.019)" xlink:href="#radial-gradient"/>
  309.                   <radialGradient id="radial-gradient-3" cx="36.331" cy="55.91" r="20.339"
  310.                                   gradienttransform="matrix(1, 0, 0, 1, 0, 0)" xlink:href="#radial-gradient"/>
  311.                 </defs>
  312.                 <g id="Instagram" transform="translate(0.3 -3.8)">
  313.                   <g id="Group_43" data-name="Group 43" transform="translate(-0.3 3.8)">
  314.                     <path id="Path_55" data-name="Path 55"
  315.                           d="M118.908,31.9a1.108,1.108,0,1,0,1.108,1.108A1.107,1.107,0,0,0,118.908,31.9Z"
  316.                           transform="translate(-105.093 -28.877)" fill="url(#radial-gradient)"/>
  317.                     <path id="Path_56" data-name="Path 56"
  318.                           d="M12.589,3.8H4.832A5.136,5.136,0,0,0-.3,8.921v7.757A5.129,5.129,0,0,0,4.832,21.8h7.757a5.136,5.136,0,0,0,5.132-5.121V8.921A5.136,5.136,0,0,0,12.589,3.8Zm3.583,12.889a3.582,3.582,0,0,1-3.583,3.583H4.832a3.582,3.582,0,0,1-3.583-3.583V8.921A3.582,3.582,0,0,1,4.832,5.339h7.757a3.582,3.582,0,0,1,3.583,3.583Z"
  319.                           transform="translate(0.3 -3.8)" fill="url(#radial-gradient-2)"/>
  320.                     <path id="Path_57" data-name="Path 57"
  321.                           d="M45.116,44.6a4.616,4.616,0,1,0,4.616,4.616A4.622,4.622,0,0,0,45.116,44.6Zm0,7.682a3.066,3.066,0,1,1,3.077-3.066A3.072,3.072,0,0,1,45.116,52.282Z"
  322.                           transform="translate(-36.11 -40.21)" fill="url(#radial-gradient-3)"/>
  323.                   </g>
  324.                 </g>
  325.               </svg>
  326.               <span class="sr-only">Instagram</span>
  327.             {% endif %}
  328.             {% if post['subtitle'] == 'Linkedin' %}
  329.               <svg alt="Linkedin" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg"
  330.                    width="18" height="17.969"
  331.                    viewbox="0 0 18 17.969">
  332.                 <g id="Group_56" data-name="Group 56" transform="translate(-469.935 -116.826)">
  333.                   <path id="Path_76" data-name="Path 76"
  334.                         d="M470.232,122.792h3.73v12h-3.73Zm1.866-5.966a2.163,2.163,0,1,1-2.163,2.162,2.164,2.164,0,0,1,2.163-2.162"
  335.                         transform="translate(0 0)" fill="#fff"/>
  336.                   <path id="Path_77" data-name="Path 77"
  337.                         d="M506.394,149.576h3.578v1.64h.05a3.92,3.92,0,0,1,3.53-1.939c3.777,0,4.475,2.486,4.475,5.718v6.583H514.3v-5.837c0-1.392-.026-3.182-1.938-3.182-1.941,0-2.239,1.516-2.239,3.082v5.938h-3.727Z"
  338.                         transform="translate(-30.091 -26.784)" fill="#fff"/>
  339.                 </g>
  340.               </svg>
  341.               <span class="sr-only">Linkedin</span>
  342.             {% endif %}
  343.           </div>
  344.           <div class="__body">
  345.             {% if post['defaut_fil'] is defined and post['defaut_fil'] is same as(true) %}
  346.               <div class="__img-wrapper">
  347.                 <div
  348.                   class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  349.                   data-background-image="{{ post['illustrationfil_name'] }}"
  350.                   style='padding-bottom:{{ post['padding'] }}%;'></div>
  351.               </div>
  352.             {% elseif post['illustrationfil_name'] is defined and post['illustrationfil_name'] != null %}
  353.               <div class="__img-wrapper">
  354.                 <div
  355.                   class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  356.                   data-background-image="{{ asset('upload/images/'~post['illustrationfil_name']) | imagine_filter('thumb') }}"
  357.                   style='padding-bottom:{{ post['padding'] }}%;'></div>
  358.               </div>
  359.             {% elseif post['image_url']is defined and post['image_url']!= null %}
  360.               <div class="__img-wrapper">
  361.                 <div
  362.                   class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  363.                   data-background-image="{{ post['image_url'] }}"
  364.                   style='padding-bottom:{{ post['padding'] }}%;'></div>
  365.               </div>
  366.             {% endif %}
  367.             <p class="__desc">
  368.               {{ post['short_description']|raw }}
  369.             </p>
  370.           </div>
  371.         </a>
  372.       </div>
  373.     {% elseif post['type']['type'] == 'sondage' %}
  374.       <div class="col-checkboxes-item col-item">
  375.         <p class="sr-only"
  376.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  377.            id="list-item-{{ post['id'] }}"
  378.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  379.         <div class="checkboxesContainer"
  380.              id="checkboxesContainer{{ post['id'] }}">
  381.           <div class="container">
  382.             <h3 class="__title" id="sondageTitle{{ post['id'] }}">{{ post['title'] }}</h3>
  383.             <div id="sondage{{ post['id'] }}" class="d-flex justify-content-center">
  384.               <div data-checkbox-group>
  385.                 {% for response in post['reponses'] %}
  386.                   <div class="form-check">
  387.                     <input class="form-check-input" type="radio" name="sondageRadios{{ post['id'] }}"
  388.                            id="resp{{ response['id'] }}" value="{{ response['id'] }}">
  389.                     <label class="form-check-label" for="resp{{ response['id'] }}">{{ response['texte'] }}</label>
  390.                   </div>
  391.                   <script>
  392.                     sondageid = "{{ post['id'] }}";
  393.                     respid = "{{ response['id'] }}";
  394.                     $('#resp' + respid).on('click', function () {
  395.                       let $checkboxesContainer = $('#checkboxesContainer' + "{{ post['id'] }}");
  396.                       let checkboxesContainerInner = $checkboxesContainer[0].querySelector('.container');
  397.                       checkboxesContainerInner.style.opacity = '.1';
  398.                       let $sondage = $('#sondage' + "{{ post['id'] }}");
  399.                       let $sondageTitle = $('#sondageTitle' + "{{ post['id'] }}");
  400.                       let $loaderSondage = $('#loaderSondage' + "{{ post['id'] }}");
  401.                       let heightCheckboxesContainer = $checkboxesContainer.outerHeight();
  402.                       $checkboxesContainer.css('min-height', heightCheckboxesContainer + 'px');
  403.                       $sondage.html('');
  404.                       $sondageTitle.html('Vos réponses :');
  405.                       $loaderSondage.fadeIn();
  406.                       $.ajax({
  407.                         type: 'POST',
  408.                         url: "{{ path('ajax_count_sondage') }}",
  409.                         data: {
  410.                           'sondage_id': "{{ post['id'] }}",
  411.                           'response_id': "{{ response['id'] }}"
  412.                         },
  413.                         success: function (data) {
  414.                           $loaderSondage.hide();
  415.                           checkboxesContainerInner.style.opacity = '1';
  416.                           $('#sondage' + data.sondage).removeClass('d-flex justify-content-center');
  417.                           $.each(data.votes, function (index, value) {
  418.                             let html = '<div class="__result"><div class="__text">' + value.texte + ' : <strong>' + value.pourcent + '%</strong></div><div class="__bar"><div class="__inner" style="width:' + value.pourcent + '%;"></div></div></div>';
  419.                             $('#sondage' + data.sondage).append(html);
  420.                           });
  421.                           window.masonryGrid.layout();
  422.                         }
  423.                       });
  424.                     });
  425.                   </script>
  426.                 {% endfor %}
  427.               </div>
  428.             </div>
  429.           </div>
  430.           <div class="__loader-container" id="loaderSondage{{ post['id'] }}" style="display:none;">
  431.             <span class="loader">Chargement en cours</span>
  432.           </div>
  433.         </div>
  434.       </div>
  435.     {% elseif post['type']['type'] == 'intranet' %}
  436.       <div class="colArticleItem col-item">
  437.         <p class="sr-only"
  438.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  439.            id="list-item-{{ post['id'] }}"
  440.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  441.         <a
  442.           href="{{ path('post_detail', {"slug": post['slug']}) }}"
  443.           class="articleItem _article {% if post['grand_format'] != 1 %}_short{% endif %} _locked">
  444.           <span class="__lock">
  445.             {{ source('svg/lock.svg') }}
  446.           </span>
  447.           <div class="__inner">
  448.             <div class="__col-img">
  449.               <div
  450.                 class="__img placement{% if post['position_image']['id']is defined %}{{ post['position_image']['id'] }}{% endif %} lozad"
  451.                 data-background-image="{{ asset('img/visuel-intranet.png_5e81dc3807ceb.png') }}">
  452.                 <button class="__button-remove" id="btnRemove{{ post['id'] }}" data-remove-item="{{ post['id'] }}"
  453.                         title="Retirer des favoris">
  454.                   <svg aria-hidden="true" focusable="false" data-name="Calque 1"
  455.                        xmlns="http://www.w3.org/2000/svg" viewbox="0 0 283.5 283.5">
  456.                     <path class=""
  457.                           d="M240.9,42.5a140.29,140.29,0,1,0,0,198.4C295.7,186.2,295.7,97.3,240.9,42.5ZM176.5,182.7,141.7,148,107,182.8l-6.3-6.3,34.8-34.8L100.7,107l6.3-6.3,34.8,34.8,34.8-34.8,6.3,6.3L148,141.7l34.8,34.8Z"/>
  458.                   </svg>
  459.                   <span class="sr-only">Retirer des favoris</span>
  460.                 </button>
  461.               </div>
  462.             </div>
  463.             <div class="__col-info">
  464.               <div class="__info-wrapper">
  465.                 <h2 class="__title">
  466.                   <span>{{ post['title'] }}</span>
  467.                 </h2>
  468.                 {% if post['short_description']|length > 0 %}
  469.                   <p class="__desc">
  470.                     {{ post['short_description'] }}
  471.                   </p>
  472.                 {% endif %}
  473.               </div>
  474.             </div>
  475.           </div>
  476.         </a>
  477.       </div>
  478.     {% elseif post['type']['type'] == 'quiz' %}
  479.       <div class="col-checkboxes-item col-item">
  480.         <p class="sr-only"
  481.            style="position:absolute;left:0;width:100%;height:30px;visibility:hidden;opacity:0;{% if loop.index == 1 %}top:-24px;{% else %}top:0;{% endif %}"
  482.            id="list-item-{{ post['id'] }}"
  483.            data-date-bar-scroll-point>{{ date|format_datetime(locale='fr', pattern="d MMMM Y") }}</p>
  484.         {% include 'Nordinfo/Main/parts/quiz_block.html.twig' with {post: post, content_post: '', is_detail: false} only %}
  485.       </div>
  486.     {% endif %}
  487.   {% endif %}
  488. {% endif %}