Refactoring : sécurité (XSS), découpage en modules inc/* et js/admin/*, IDs résolus par slug, perf (caches, cron Gravatar, assets auto-hébergés), tests

This commit is contained in:
2026-06-10 21:30:25 +02:00
parent e6b73df516
commit 9280c3b9ce
44 changed files with 3209 additions and 2907 deletions

View File

@@ -20,6 +20,6 @@
{% if type_label %}<span>{{ type_label }}</span>{% endif %}
{% if lieu %}<span>{{ lieu }}</span>{% endif %}
</div>
<p class="agenda-card__title">{{ post.title }}</p>
<p class="agenda-card__title">{{ post.title|bilingual }}</p>
</div>
</a>

View File

@@ -1,18 +1,18 @@
<article class="author-card">
<a href="{{ author.url }}" class="author-card__visual" tabindex="-1" aria-hidden="true">
<a href="{{ author.url|esc_url }}" class="author-card__visual" tabindex="-1" aria-hidden="true">
{% if author.avatar_url %}
<img src="{{ author.avatar_url }}" alt="{{ author.name }}" loading="lazy">
<img src="{{ author.avatar_url|esc_url }}" alt="{{ author.name|esc_attr }}" loading="lazy">
{% else %}
<span class="author-card__initials">{{ author.initials }}</span>
<span class="author-card__initials">{{ author.initials|esc_html }}</span>
{% endif %}
</a>
<div class="author-card__info">
<h2 class="author-card__name"><a href="{{ author.url }}">{{ author.name }}</a></h2>
<h2 class="author-card__name"><a href="{{ author.url|esc_url }}">{{ author.name|esc_html }}</a></h2>
{% if author.role_label %}
<p class="author-card__role">{{ author.role_label }}</p>
<p class="author-card__role">{{ author.role_label|esc_html }}</p>
{% endif %}
{% if author.affiliation %}
<p class="author-card__affiliation">{{ author.affiliation }}</p>
<p class="author-card__affiliation">{{ author.affiliation|esc_html }}</p>
{% endif %}
</div>
</article>

View File

@@ -40,77 +40,3 @@
</h2>
{% endif %}
</article>
{#
<article class="post-card">
{% if card.card_image %}
<div class="post-card__image">
<img src="{{ card.card_image }}" alt="{{ post.title }}" loading="lazy">
</div>
{% endif %}
<div class="post-card__content">
<h3 class="post-card__title">
<a href="{{ post.link }}">{{ post.title }}</a>
</h3>
{% if post.meta('sous-titre') %}
<p class="post-card__subtitle">{{ post.meta('sous-titre') }}</p>
{% endif %}
<time class="post-card__date" datetime="{{ post.date('Y-m-d') }}">{{ post.date('d/m/Y') }}</time>
{% if card.card_membres is not empty or post.meta('autrepersonnes') %}
<div class="post-card__authors">
{% for name in card.card_membres %}
<span class="post-card__author">{{ name }}</span>
{% endfor %}
{% if post.meta('autrepersonnes') %}
<span class="post-card__author post-card__author--external">{{ post.meta('autrepersonnes') }}</span>
{% endif %}
</div>
{% endif %}
{% if post.meta('fonction_auteur') %}
<span class="post-card__role">{{ post.meta('fonction_auteur') }}</span>
{% endif %}
{% if post.meta('editeur') %}
<span class="post-card__publisher">{{ post.meta('editeur') }}</span>
{% endif %}
{% if post.meta('journal') %}
<span class="post-card__journal">{{ post.meta('journal') }}</span>
{% endif %}
{% if card.card_axes is not empty %}
<div class="post-card__axes">
{% for axe in card.card_axes %}
<span class="post-card__axe">{{ axe }}</span>
{% endfor %}
</div>
{% endif %}
{% if card.card_etiquettes is not empty %}
<div class="post-card__tags">
{% for tag in card.card_etiquettes %}
<span class="post-card__tag">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
<div class="post-card__links">
{% if post.meta('lien_externe_1') %}
<a href="{{ post.meta('lien_externe_1') }}" class="post-card__link" target="_blank" rel="noopener">
{{ post.meta('titre_du_lien_externe_1') ?: post.meta('lien_externe_1') }}
</a>
{% endif %}
{% if post.meta('hal_url') %}
<a href="{{ post.meta('hal_url') }}" class="post-card__link post-card__link--hal" target="_blank" rel="noopener">
HAL
</a>
{% endif %}
</div>
</div>
</article>
#}