Brume's website https://brume.ink
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

81 lines
3.1 KiB

{% macro meta(page) %}
<svg style="margin-bottom:-3px" class="i-clock" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<circle cx="16" cy="16" r="14"/>
<path d="M16 8 L16 16 20 20"/>
</svg>
<span>{{ page.reading_time }} minutes de lecture</span>
<svg style="margin-bottom: -3px" class="i-edit" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<path d="M30 7 L25 2 5 22 3 29 10 27 Z M21 6 L26 11 Z M5 22 L10 27 Z"/>
</svg>
{% if page.date %}Publié le {{ page.date | date(format="%e %b %Y") |
replace(from="Jan", to="Janvier") |
replace(from="Feb", to="Février") |
replace(from="Mar", to="Mars") |
replace(from="Apr", to="Avril") |
replace(from="May", to="Mai") |
replace(from="Jun", to="Juin") |
replace(from="Jul", to="Juillet") |
replace(from="Aug", to="Âout") |
replace(from="Sep", to="Septembre") |
replace(from="Oct", to="Octobre") |
replace(from="Nov", to="Novembre") |
replace(from="Dec", to="Décembre")}}
{% endif %}
{% endmacro meta %}
{% macro author_categories(page) %}
{% if config.extra.author %}
Publié par {{ config.extra.author }}
{% endif %}
{% if page.taxonomies.categories %}
{% if page.taxonomies.categories | length > 1 %}
dans les catégories
{% else %}
dans la catégorie
{% endif %}
{% set and_place = page.taxonomies.categories | length - 2 %}
{% set dot_place = and_place + 1 %}
{%for category in page.taxonomies.categories %}
<a class="link" href="{{ get_taxonomy_url(kind="categories", name=category) | lower | safe }}">{{ category }}</a>{% if page.taxonomies.categories | length > 1 and category == page.taxonomies.categories[and_place] %} et {% elif category == page.taxonomies.categories[dot_place] %}. {% else %}, {% endif %}
{% endfor %}
{% endif %}
{% endmacro author_categories %}
{#<div class="wrapper" style="background:url({{page.extra.illustration}}) center/cover no-repeat;">#}
{% macro page_in_list(page) %}
<article>
<div class="card card-news">
<div class="wrapper">
<a href="{{ page.permalink | safe }}">
<div class="card-img">
<img class="card-image" src="{{page.extra.illustration}}" alt="" />
</div>
</a>
<div class="date date-news">
<span class="day">{{page.day}}</span>
<span class="month">{{page.extra.month}}</span>
<span class="year">{{page.year}}</span>
</div>
<div class="data">
<div class="content content-blog">
<a href="{{ page.permalink | safe }}">
<h1 class="title">{{page.title}}</h1>
</a>
<p class="text art-desc">{{page.description}}</p>
<p class="meta">
{{ macros::meta(page=page) }}<br>
{{ macros::author_categories(page=page) }}
</p>
</div>
</div>
</div>
</div>
</article>
{% endmacro page_in_list %}