Files
figureslibres.cc/user/themes/figureslibres/templates/partials/blog-list-item.html.twig
T
2019-10-07 23:02:29 +02:00

39 lines
1.2 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'-', 'é':'e', ',':'',':':'','.':'','(':'',')':'','?':'', "": '','ê':'e' }) }}{% endmacro %}
{% import _self as macro %}
{% set image = page.media.images|first %}
{% set services_image = page.media.images|first.derivatives(100, 200, 300, 400, 600).sizes('50vw, 30vw') %}
{% if image %}
<!-- card projet -->
<div class="card">
<div class='loader'></div>
<div id="{{ page.folder }}" class="card-image">
<a href="{{ page.url }}">
<div class="card-header">
{% if page.header.title %}
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
{% endif %}
{% if page.header.taxonomy.tag %}
{% include 'partials/blog/taxonomy.html.twig' %}
{% endif %}
{% if page.header.date %}
{% include 'partials/blog/date.html.twig' %}
{% endif %}
</div>
<img class="lazy" data-src="{{ services_image.url() }}" data-srcset="{{ services_image.srcset() }}">
</a>
</div>
</div>
{% else %}
{% include 'partials/blog/title.html.twig' with {title_level: 'p'} %}
{% endif %}