fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b999d1
)
Switch cover.
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 5 Jun 2023 13:38:34 +0000
(15:38 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 5 Jun 2023 13:38:34 +0000
(15:38 +0200)
src/catalogue/templates/catalogue/book_mini_box.html
patch
|
blob
|
history
src/catalogue/templates/catalogue/book_short.html
patch
|
blob
|
history
src/catalogue/templates/catalogue/book_text.html
patch
|
blob
|
history
src/catalogue/templates/catalogue/collection_box.html
patch
|
blob
|
history
src/wolnelektury/views.py
patch
|
blob
|
history
diff --git
a/src/catalogue/templates/catalogue/book_mini_box.html
b/src/catalogue/templates/catalogue/book_mini_box.html
index
b74d651
..
c9e324b
100644
(file)
--- a/
src/catalogue/templates/catalogue/book_mini_box.html
+++ b/
src/catalogue/templates/catalogue/book_mini_box.html
@@
-1,12
+1,13
@@
{% spaceless %}
{% 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 %}
{% 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>
{% endif %}
{% if book.is_foreign %}
<span class="language" title="{{ book.language_name }}">{{ book.language_code }}</span>
@@
-21,4
+22,4
@@
</div>
</div>
{% endwith %}
</div>
</div>
{% endwith %}
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}
diff --git
a/src/catalogue/templates/catalogue/book_short.html
b/src/catalogue/templates/catalogue/book_short.html
index
6f88cf0
..
9c2e6a0
100644
(file)
--- a/
src/catalogue/templates/catalogue/book_short.html
+++ b/
src/catalogue/templates/catalogue/book_short.html
@@
-1,5
+1,6
@@
{% spaceless %}
{% load i18n %}
{% spaceless %}
{% load i18n %}
+ {% load thumbnail %}
{% load cache %}
{% load catalogue_tags %}
{% load book_shelf_tags from social_tags %}
{% load cache %}
{% load catalogue_tags %}
{% load book_shelf_tags from social_tags %}
@@
-21,9
+22,9
@@
{% endblock %}
<div class="cover-area">
{% endblock %}
<div class="cover-area">
- {% if book.cover_
thumb
%}
+ {% if book.cover_
clean
%}
<a href="{% block cover-link %}{{ book.get_absolute_url }}{% endblock %}">
<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 %}
</a>
{% endif %}
{% block cover-area-extra %}{% endblock %}
diff --git
a/src/catalogue/templates/catalogue/book_text.html
b/src/catalogue/templates/catalogue/book_text.html
index
70915da
..
758c8cb
100644
(file)
--- a/
src/catalogue/templates/catalogue/book_text.html
+++ b/
src/catalogue/templates/catalogue/book_text.html
@@
-22,7
+22,7
@@
<li>
<a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
<span class="label">{% trans "Click to download" %}:</span>
<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 }}">
width="120" height="166"
alt="{{ book.pretty_title }}"
title="{{ book.pretty_title }}">
diff --git
a/src/catalogue/templates/catalogue/collection_box.html
b/src/catalogue/templates/catalogue/collection_box.html
index
c19ea8d
..
ec79ca6
100644
(file)
--- a/
src/catalogue/templates/catalogue/collection_box.html
+++ b/
src/catalogue/templates/catalogue/collection_box.html
@@
-1,5
+1,6
@@
{% spaceless %}
{% load i18n %}
{% 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="collection-box white-box">
<h2><a href="{{ collection.get_absolute_url }}">{{ collection }}</a></h2>
<div class="description">
@@
-10,7
+11,7
@@
<div class="covers">
{% for book in collection.get_books|slice:":6" %}
<a href="{{ book.get_absolute_url }}">
<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>
</a>
{% endfor %}
</div>
diff --git
a/src/wolnelektury/views.py
b/src/wolnelektury/views.py
index
9f099bd
..
a0e1ae4
100644
(file)
--- a/
src/wolnelektury/views.py
+++ b/
src/wolnelektury/views.py
@@
-47,7
+47,7
@@
def main_page(request):
return main_page_2022(request)
ctx = {
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': [],
}
'theme_books': [],
}