- Ajout d'une image par défaut lorsqu'il n'y en a aucune.
This commit is contained in:
@ -24,12 +24,15 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="flex flex-row w-1/4">
|
||||
{% if book.volumeInfo.imageLinks is defined and book.volumeInfo.imageLinks.smallThumbnail is defined %}
|
||||
<img src="{{ book.volumeInfo.imageLinks.smallThumbnail }}" class="p-2">
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="w-9/12">
|
||||
<div class="flex flex-row w-1/4">
|
||||
{% if book.volumeInfo.imageLinks is defined and book.volumeInfo.imageLinks.smallThumbnail is defined %}
|
||||
<img src="{{ book.volumeInfo.imageLinks.smallThumbnail }}" class="p-2 w-[200px] h-[250] object-cover">
|
||||
{% else %}
|
||||
<img src="https://fakeimg.pl/550x750?text=no+cover" class="p-2 object-cover">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="w-9/12">
|
||||
{% if book.volumeInfo.publisher is defined %}
|
||||
<p class="p-2 italic font-bold">Aux éditions :
|
||||
<span class="font-normal">{{ book.volumeInfo.publisher }}</span>
|
||||
@ -192,7 +195,7 @@
|
||||
|
||||
<script>
|
||||
function toggleLike(idGoogle, liked, element, bookDetails) {
|
||||
const url = liked
|
||||
const url = liked
|
||||
? "{{ path('unlike', {'idGoogle': 'PLACEHOLDER'}) }}".replace('PLACEHOLDER', idGoogle)
|
||||
: "{{ path('like', {'idGoogle': 'PLACEHOLDER'}) }}".replace('PLACEHOLDER', idGoogle);
|
||||
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
<div id="myModal-{{ loop.index }}" class="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center hidden z-50">
|
||||
<div class="relative bg-white p-6 rounded-lg w-1/3 max-h-screen overflow-y-auto">
|
||||
<div class="flex mx-auto flex-row w-1/4">
|
||||
<div class="flex flex-row w-1/4">
|
||||
{% if book.volumeInfo.imageLinks is defined and book.volumeInfo.imageLinks.smallThumbnail is defined %}
|
||||
<img src="{{ book.volumeInfo.imageLinks.smallThumbnail }}" class="p-2">
|
||||
<img src="{{ book.volumeInfo.imageLinks.smallThumbnail }}" class="p-2 w-[200px] h-[250] object-cover">
|
||||
{% else %}
|
||||
<img src="https://fakeimg.pl/550x750?text=no+cover" class="p-2 object-cover">
|
||||
{% endif %}
|
||||
</div>
|
||||
<svg id="closeModalSvg-{{ loop.index }}" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||
|
Reference in New Issue
Block a user