45 lines
1.1 KiB
Twig
45 lines
1.1 KiB
Twig
{% extends "base.twig" %}
|
|
{% block content %}
|
|
{% include 'components/title_page.twig' %}
|
|
{% set now = 'now'|date('Ymd') %}
|
|
<section class="row filter">
|
|
<ul class="d-flex col flex-wrap">
|
|
<li><a href="/archive">Archive</a></li>
|
|
</ul>
|
|
<ul class="cat-list col d-flex flex-wrap">
|
|
<li data-filter="*" >
|
|
Tous
|
|
</li>
|
|
|
|
{% set newArray = [] %}
|
|
{% for cat in posts %}
|
|
{% set end = cat.informations_fin_event|date("Ymd") %}
|
|
{% set term = cat.categories|last.slug %}
|
|
{% if term not in newArray and now <= end %}
|
|
<li data-filter=".{{cat.categories|last.slug}}">
|
|
{{cat.categories|last.name}}
|
|
</li>
|
|
{% set newArray = newArray|merge([term]) %}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
</ul>
|
|
</section>
|
|
|
|
<div class="paralax agenda" data-rellax-speed="-5">
|
|
<img src="{{theme.link}}/dist/assets/images/objet_4.svg" alt="objet 4">
|
|
</div>
|
|
|
|
<section class="grid">
|
|
{% for item in posts %}
|
|
{% set end = item.informations_fin_event|date("Ymd") %}
|
|
{% if now <= end %}
|
|
{% include 'components/thumbnails/thumbnails.twig' with { hn : 'h2'} %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|