From 31c9c07e384e4aa0a14cd73282d2bc760f94eb28 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 23 Feb 2021 14:06:08 -0800 Subject: [PATCH] Makes covers clickable on discover page --- bookwyrm/templates/{ => discover}/discover.html | 12 ++++++------ .../{snippets => }/discover/large-book.html | 2 +- .../{snippets => }/discover/small-book.html | 2 +- bookwyrm/views/landing.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename bookwyrm/templates/{ => discover}/discover.html (85%) rename bookwyrm/templates/{snippets => }/discover/large-book.html (85%) rename bookwyrm/templates/{snippets => }/discover/small-book.html (79%) diff --git a/bookwyrm/templates/discover.html b/bookwyrm/templates/discover/discover.html similarity index 85% rename from bookwyrm/templates/discover.html rename to bookwyrm/templates/discover/discover.html index 27e26e53..0b6f8a1f 100644 --- a/bookwyrm/templates/discover.html +++ b/bookwyrm/templates/discover/discover.html @@ -63,18 +63,18 @@
- {% include 'snippets/discover/large-book.html' with book=books.0 %} + {% include 'discover/large-book.html' with book=books.0 %}
- {% include 'snippets/discover/small-book.html' with book=books.1 %} + {% include 'discover/small-book.html' with book=books.1 %}
- {% include 'snippets/discover/small-book.html' with book=books.2 %} + {% include 'discover/small-book.html' with book=books.2 %}
@@ -83,18 +83,18 @@
- {% include 'snippets/discover/small-book.html' with book=books.3 %} + {% include 'discover/small-book.html' with book=books.3 %}
- {% include 'snippets/discover/small-book.html' with book=books.4 %} + {% include 'discover/small-book.html' with book=books.4 %}
- {% include 'snippets/discover/large-book.html' with book=books.5 %} + {% include 'discover/large-book.html' with book=books.5 %}
diff --git a/bookwyrm/templates/snippets/discover/large-book.html b/bookwyrm/templates/discover/large-book.html similarity index 85% rename from bookwyrm/templates/snippets/discover/large-book.html rename to bookwyrm/templates/discover/large-book.html index 37b35947..401411a1 100644 --- a/bookwyrm/templates/snippets/discover/large-book.html +++ b/bookwyrm/templates/discover/large-book.html @@ -2,7 +2,7 @@ {% if book %}
- {% include 'snippets/book_cover.html' with book=book size="large" %} + {% include 'snippets/book_cover.html' with book=book size="large" %} {% include 'snippets/stars.html' with rating=ratings|dict_key:book.id %}
diff --git a/bookwyrm/templates/snippets/discover/small-book.html b/bookwyrm/templates/discover/small-book.html similarity index 79% rename from bookwyrm/templates/snippets/discover/small-book.html rename to bookwyrm/templates/discover/small-book.html index be399df6..d1676b6b 100644 --- a/bookwyrm/templates/snippets/discover/small-book.html +++ b/bookwyrm/templates/discover/small-book.html @@ -1,6 +1,6 @@ {% load bookwyrm_tags %} {% if book %} -{% include 'snippets/book_cover.html' with book=book %} +{% include 'snippets/book_cover.html' with book=book %} {% if ratings %} {% include 'snippets/stars.html' with rating=ratings|dict_key:book.id %} {% endif %} diff --git a/bookwyrm/views/landing.py b/bookwyrm/views/landing.py index 0d841ef0..854f3a9b 100644 --- a/bookwyrm/views/landing.py +++ b/bookwyrm/views/landing.py @@ -56,4 +56,4 @@ class Discover(View): 'books': list(set(books)), 'ratings': ratings } - return TemplateResponse(request, 'discover.html', data) + return TemplateResponse(request, 'discover/discover.html', data)