Files
2020-01-20 11:51:20 +01:00

44 lines
1.3 KiB
Twig
Raw Permalink 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(320,1600,300).sizes('(max-width:26em) 100vw, 50vw') %} #}
{% set services_image = page.media.images|first%}
{% 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>
{{ services_image.sizes('(max-width:26em) 100vw').html(page.header.title, 'images projets', '')}}
</a>
</div>
</div>
{% else %}
{% if content == true %}
{{content}}
{% else %}
{% include 'partials/blog/title.html.twig' with {title_level: 'p'} %}
{% endif %}
{% endif %}