{% extends 'base.html.twig' %} {% block title %}{{ author.name }} · LivreComment{% endblock %} {% block app_header %} {% include 'components/_detail_header.html.twig' with { back_fallback: path('app_search'), title: 'Recherche' } only %} {% endblock %} {% block body %}
{% set author_photo_url = author_photo(author) %} {# Placeholder à initiales TOUJOURS présent ; la photo (si dispo) est posée par-dessus en overlay. onerror="this.remove()" : si la photo 404 (ex. miniature Wikipedia obsolète, qui renvoie une page HTML), on retire l' -> les initiales réapparaissent. Robuste, jamais de picto cassé. Le replace -M->-L cible la version L des covers OL ; sans effet sur les autres URLs. #}
{{ author.name|first|upper }} {% if author_photo_url %} Portrait de {{ author.name }} {% endif %}

{{ author.name }}

{% if author.birthYear or author.deathYear %} {% endif %}
{% if top_genres|length > 0 or author.awards|length > 0 %}
{% if top_genres|length > 0 %}
{{ top_genres|length }}
{% for genre in top_genres %} {{ genre }} {% endfor %}
{% endif %} {% if author.awards|length > 0 %}
{{ author.awards|length }}
{% for award in author.awards %} {{ award }} {% endfor %}
{% endif %}
{% endif %}
{% if author.bio %} {% set author_bio_clean = author.bio|strip_markdown %} {% if author_bio_clean %}
{% endif %} {% endif %}

Tous ses livres {% if author.works|length > 0 %}{{ author.works|length }}{% endif %}

{% if author.works|length > 0 %} {% endif %} {# Complément : livres de l'auteur via Google Books, chargés en différé (eager = dès le rendu de la fiche, pas au scroll) et matérialisés au clic. NB : un frame loading="lazy" + display:contents ne se déclenche pas (pas de box à observer) → eager + grille propre. #}
{# Auteurs similaires — content-based via genres communs #} {% if similar_authors|length > 0 %}

Aussi appréciés

{% endif %} {# Adaptations agrégées — section repliable (disclosure) en bas de fiche #} {% if all_adaptations|length > 0 %}
{{ all_adaptations|length }} adaptation{{ all_adaptations|length > 1 ? 's' : '' }} à l'écran
    {% for adapt in all_adaptations|slice(0, 10) %}
  • {{ adapt.type ?? 'film' }} {{ adapt.title }} {% if adapt.work_title ?? false %}d'après {{ adapt.work_title }}{% endif %}
  • {% endfor %}
{% endif %}
{% endblock %}