fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
150c16b
)
fixes
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 3 Nov 2022 13:30:10 +0000
(14:30 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 3 Nov 2022 13:30:10 +0000
(14:30 +0100)
src/catalogue/models/collection.py
patch
|
blob
|
history
src/catalogue/templates/catalogue/2022/collections.html
patch
|
blob
|
history
src/social/templates/social/carousel_2022.html
patch
|
blob
|
history
src/wolnelektury/templates/2022/main_page.html
patch
|
blob
|
history
diff --git
a/src/catalogue/models/collection.py
b/src/catalogue/models/collection.py
index
412a976
..
f1a582c
100644
(file)
--- a/
src/catalogue/models/collection.py
+++ b/
src/catalogue/models/collection.py
@@
-56,6
+56,9
@@
class Collection(models.Model):
from catalogue.models import Book
return Book.objects.filter(self.get_query())
from catalogue.models import Book
return Book.objects.filter(self.get_query())
+ def get_5_books(self):
+ return self.get_books()[:5]
+
@cached_render('catalogue/collection_box.html')
def box(self):
return {
@cached_render('catalogue/collection_box.html')
def box(self):
return {
diff --git
a/src/catalogue/templates/catalogue/2022/collections.html
b/src/catalogue/templates/catalogue/2022/collections.html
index
ba25bcb
..
5fb4078
100644
(file)
--- a/
src/catalogue/templates/catalogue/2022/collections.html
+++ b/
src/catalogue/templates/catalogue/2022/collections.html
@@
-26,7
+26,7
@@
</p>
</div>
<div class="l-books">
</p>
</div>
<div class="l-books">
- {% for book in collection.get_books %}
+ {% for book in collection.get_
5_
books %}
{% include 'catalogue/2022/book_box.html' %}
{% endfor %}
</div>
{% include 'catalogue/2022/book_box.html' %}
{% endfor %}
</div>
diff --git
a/src/social/templates/social/carousel_2022.html
b/src/social/templates/social/carousel_2022.html
index
acdf5fe
..
edaa3bb
100644
(file)
--- a/
src/social/templates/social/carousel_2022.html
+++ b/
src/social/templates/social/carousel_2022.html
@@
-1,3
+1,7
@@
+{% if banner %}
<a href="{{ banner.link }}">
<a href="{{ banner.link }}">
+ {% if banner.picture %}
<img src="{{ banner.image.url }}">
<img src="{{ banner.image.url }}">
+ {% endif %}
</a>
</a>
+{% endif %}
diff --git
a/src/wolnelektury/templates/2022/main_page.html
b/src/wolnelektury/templates/2022/main_page.html
index
b541467
..
8112c09
100644
(file)
--- a/
src/wolnelektury/templates/2022/main_page.html
+++ b/
src/wolnelektury/templates/2022/main_page.html
@@
-143,7
+143,7
@@
<section class="l-section">
<div class="l-collections js-collections">
<div class="l-collections__header">
<section class="l-section">
<div class="l-collections js-collections">
<div class="l-collections__header">
- <h3>
{{ recommended_collection.title }}
</h3>
+ <h3>
<a href="{{ recommended_collection.get_absolute_url }}">{{ recommended_collection.title }}</a>
</h3>
{% comment %}
<div class="l-your-books__header__actions">
<button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
{% comment %}
<div class="l-your-books__header__actions">
<button class="js-prev-slide"><i class="icon icon-arrow-left"></i></button>
@@
-152,7
+152,7
@@
{% endcomment %}
</div>
<div class="l-books">
{% endcomment %}
</div>
<div class="l-books">
- {% for book in recommended_collection.get_books %}
+ {% for book in recommended_collection.get_
5_
books %}
{% include 'catalogue/2022/book_box.html' %}
{% endfor %}
</div>
{% include 'catalogue/2022/book_box.html' %}
{% endfor %}
</div>
@@
-186,7
+186,7
@@
<h3>
Zapisz się na nasz <strong>Newsletter!</strong>
</h3>
<h3>
Zapisz się na nasz <strong>Newsletter!</strong>
</h3>
- <a href="{% url 'subscribe' %}
/
?pk_campaign=home" class="l-button l-button--default">Weź udział</a>
+ <a href="{% url 'subscribe' %}?pk_campaign=home" class="l-button l-button--default">Weź udział</a>
</div>
</div>
</div>
</div>
</div>
</div>
@@
-305,7
+305,7
@@
</ul>
</div>
</ul>
</div>
- {
% sponsor_page 'footer' %
}
+ {
#% sponsor_page 'footer' %#
}
</div>
</section>
</div>
</section>