ateliers55/user/themes/ateliers-55/templates/default.html.twig

50 lines
2.2 KiB
Twig
Raw Normal View History

2024-03-26 14:22:54 +01:00
{% extends 'partials/base.html.twig' %}
{% block content %}
{% if page.url == "/" %}
{% else %}
<article>
<div id="article-wrapper">
<div class="article-header">
{% if page.parent.title == "Articles" %}
<div class="article-siblings">
{% if not page.isFirst %}
<a href="{{ page.nextSibling.url }}"><i class="fa-solid fa-chevron-left"></i> Article suivant</a>
{% else %}
<div></div>
{% endif %}
{% if not page.isLast %}
<a href="{{ page.prevSibling.url }}">Article précédent <i class="fa-solid fa-chevron-right"></i></a>
{% endif %}
</div>
{% endif %}
<a href="{{ home_url }}" class="close-article">
<div></div>
<div></div>
</a>
</div>
<div class="swiper">
<div class="swiper-button-prev"></div>
<div class="swiper-wrapper">
{% for image in page.media.images %}
<div class="swiper-slide">
<img src="{{ image.url }}" alt="{{ page.title }}">
</div>
{% endfor %}
2024-04-21 18:29:43 +02:00
{% for video in page.media.videos %}
<div class="swiper-slide">
<video controls src="{{ video.url }}">
</div>
{% endfor %}
2024-03-26 14:22:54 +01:00
</div>
<div class="swiper-button-next"></div>
</div>
{% if page.parent.title == "Articles" %}
<p class="article-date">{{ page.date | date('d/m/Y') }}</p>
{% endif %}
<p class="article-titre">{{ page.title }}</p>
<div class="article-content">{{ page.content|raw }}</div>
</div>
</article>
{% endif %}
{% endblock %}