This commit is contained in:
2020-07-07 18:25:35 +02:00
parent a9c4ac28d4
commit 737534f612
7 changed files with 171 additions and 23 deletions
+24 -11
View File
@@ -1,21 +1,34 @@
{% extends "base.twig" %}
{% block content %}
{% include 'components/title_page.twig' %}
{% set now = 'now'|date('Ydj') %}
<section>
<ul class="cat-list d-flex flex-wrap button-group filter-button-group">
<li data-filter="*" >
Tous
</li>
{% for cat in terms %}
<li data-filter=".{{cat.slug}}" >
{{cat.name}}
</li>
{% endfor %}
</ul>
<ul class="cat-list d-flex flex-wrap button-group filter-button-group">
<li data-filter="*" >
Tous
</li>
{% set newArray = [] %}
{% for cat in posts %}
{% set term = cat.categories|last.slug %}
{% set end = cat.informations_fin_event|date("Ydj") %}
{% 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>
<div class="grid">
{% for item in posts %}
{% include 'components/thumbnails/thumbnails.twig'%}
{% set end = item.informations_fin_event|date("Ydj") %}
{% if now >= end %}
{% include 'components/thumbnails/thumbnails.twig'%}
{% endif %}
{% endfor %}
</div>
<div class="paralax" data-rellax-speed="-5">