- Ajout du nombre de résultats recherche de livres

This commit is contained in:
2025-01-30 09:53:22 +01:00
parent a8e2510a03
commit 4533246181

View File

@ -1,6 +1,6 @@
{% extends 'base.html.twig' %}
{% block title %}{% endblock %}
{% block title %}Recherche | {{ query }}{% endblock %}
{% block body %}
<div>
@ -8,6 +8,11 @@
<h1 class="text-2xl font-bold">Résultats pour :
{{ query }}</h1>
</div>
<div class="w-1/2 pb-1 flex flex-col justify-center mx-auto">
<p>
{{ datas.totalItems }} résultats trouvés
</p>
</div>
{% for book in datas.items %}
<div class="relative flex rounded-xl border bg-white shadow-lg hover:shadow-xl transition-shadow duration-300 w-1/2 mx-auto py-2 mt-5">
<div class="flex flex-col justify-start">
@ -121,7 +126,7 @@
<p class="p-2 italic font-bold">Nombre de pages : <span class="font-normal">{{ book.volumeInfo.pageCount }}</span></p>
{% endif %}
{% if book.searchInfo is defined and book.searchInfo.textSnippet is defined and book.volumeInfo.description is not empty %}
{% if book.volumeInfo is defined and book.volumeInfo.description is defined and book.volumeInfo.description is not empty %}
<p class="p-2 italic font-bold">Description : <span class="font-normal">{{ book.volumeInfo.description | raw }}</span></p>
{% endif %}