{% spaceless %}
+ {% load thumbnail %}
{% with book.author_unicode as author %}
<div class="book-mini-box">
<div class="book-mini-box-inner">
{% if not no_link %}
<a href="{{ book.get_absolute_url }}">
{% endif %}
- {% if book.cover_thumb %}
- <img src="{{ book.cover_thumb.url }}" alt="{{ author }} – {{ book.title }}" class="cover" />
+ {% if book.cover_clean %}
+ <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="{{ author }} – {{ book.title }}" class="cover" />
{% endif %}
{% if book.is_foreign %}
<span class="language" title="{{ book.language_name }}">{{ book.language_code }}</span>
</div>
</div>
{% endwith %}
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
{% spaceless %}
{% load i18n %}
+ {% load thumbnail %}
{% load cache %}
{% load catalogue_tags %}
{% load book_shelf_tags from social_tags %}
{% endblock %}
<div class="cover-area">
- {% if book.cover_thumb %}
+ {% if book.cover_clean %}
<a href="{% block cover-link %}{{ book.get_absolute_url }}{% endblock %}">
- <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
+ <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="Cover" class="cover" />
</a>
{% endif %}
{% block cover-area-extra %}{% endblock %}
<li>
<a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
<span class="label">{% trans "Click to download" %}:</span>
- <img src="{% if book.cover_thumb %}{% thumbnail book.cover_thumb '240x332' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover_thumb.url }}{% endthumbnail %}{% endif %}"
+ <img src="{% if book.cover_clean %}{% thumbnail book.cover_clean '240x332' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover_clean.url }}{% endthumbnail %}{% endif %}"
width="120" height="166"
alt="{{ book.pretty_title }}"
title="{{ book.pretty_title }}">
{% spaceless %}
{% load i18n %}
+ {% load thumbnail %}
<div class="collection-box white-box">
<h2><a href="{{ collection.get_absolute_url }}">{{ collection }}</a></h2>
<div class="description">
<div class="covers">
{% for book in collection.get_books|slice:":6" %}
<a href="{{ book.get_absolute_url }}">
- <img src="{{ book.cover_thumb.url }}" alt="{{ book.pretty_title }}" title="{{ book.pretty_title }}">
+ <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="{{ book.pretty_title }}" title="{{ book.pretty_title }}">
</a>
{% endfor %}
</div>
return main_page_2022(request)
ctx = {
- 'last_published': Book.objects.exclude(cover_thumb='').filter(findable=True, parent=None).order_by('-created_at')[:6],
+ 'last_published': Book.objects.exclude(cover_clean='').filter(findable=True, parent=None).order_by('-created_at')[:6],
'theme_books': [],
}