grav-theme-libretic/templates/partials/blog_item.html.twig

75 lines
2.5 KiB
Twig
Raw Normal View History

2015-01-15 19:15:54 +01:00
<div class="list-item">
<div class="list-blog-header">
2015-01-22 17:14:47 +01:00
{% if big_header %}
2020-12-13 01:32:27 +01:00
{{ page.media.images|first.cropResize(900,600).html|raw }}
2015-01-22 17:14:47 +01:00
{% else %}
2020-12-13 01:32:27 +01:00
{{ page.media.images|first.cropZoom(900,300).html|raw }}
2015-01-22 17:14:47 +01:00
{% endif %}
2015-01-15 19:15:54 +01:00
{% if page.header.link %}
<h4>
{% if page.header.continue_link is not sameas(false) %}
<a href="{{ page.url }}"><i class="fa fa-angle-double-right"></i></a>
{% endif %}
<a href="{{ page.header.link }}">{{ page.title }}</a>
</h4>
{% else %}
<h4><a href="{{ page.url }}">{{ page.title }}</a></h4>
{% endif %}
2015-01-22 13:28:29 +01:00
<span class="list-blog-date">
<i class="fa fa-calendar"></i>
{{ page.date|date("d") }} {{ page.date|localizeddate('long', 'none', 'fr', 'Europe/Paris', 'MMM') }} {{ page.date|date("Y") }}
2015-01-22 13:28:29 +01:00
</span>
2015-01-22 17:14:47 +01:00
{% if page.header.author %}
<span class="list-blog-author">
<i class="fa fa-user"></i>
{{ page.header.author }}
</span>
{% endif %}
2015-01-22 13:28:29 +01:00
{% if page.taxonomy.tag %}
2015-01-22 16:29:30 +01:00
<ul class="tags">
2015-01-22 13:28:29 +01:00
<i class="fa fa-tag"></i>
2015-01-15 19:15:54 +01:00
{% for tag in page.taxonomy.tag %}
2015-02-19 00:14:33 +01:00
<li><a href="{{ base_url }}/tag{{ config.system.param_sep }}{{ tag }}">{{ tag }}</a></li>
2015-01-15 19:15:54 +01:00
{% endfor %}
2015-01-22 16:29:30 +01:00
</ul>
2015-01-15 19:15:54 +01:00
{% endif %}
2015-01-15 19:15:54 +01:00
</div>
<div class="list-blog-padding">
{% if page.header.continue_link is sameas(false) %}
2020-12-13 01:32:27 +01:00
<p>{{ page.content|raw }}</p>
2015-01-15 19:15:54 +01:00
{% if not truncate %}
{% set show_prev_next = true %}
{% endif %}
{% elseif truncate and page.summary != page.content %}
2020-12-13 01:32:27 +01:00
<p>{{ page.summary|raw }}</p>
<p><a href="{{ page.url }}">Continuer la lecture...</a></p>
2015-01-15 19:15:54 +01:00
{% elseif truncate %}
<p>{{ page.content|truncate(550) }}</p>
<p><a href="{{ page.url }}">Continuer la lecture...</a></p>
2015-01-15 19:15:54 +01:00
{% else %}
2020-12-13 01:32:27 +01:00
<p>{{ page.content|raw }}</p>
2015-01-15 19:15:54 +01:00
{% set show_prev_next = true %}
{% endif %}
{% if show_prev_next %}
<p class="prev-next">
{% if not page.isLast %}
<a class="button" href="{{ page.prevSibling.url }}"><i class="fa fa-chevron-left"></i> Article précédent</a>
2015-01-15 19:15:54 +01:00
{% endif %}
{% if not page.isFirst %}
<a class="button" href="{{ page.nextSibling.url }}">Article suivant <i class="fa fa-chevron-right"></i></a>
2015-01-15 19:15:54 +01:00
{% endif %}
</p>
{% endif %}
</div>
</div>