From 9082eefd8fd7073342af5116ac2432b82cb6a28d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 07:08:19 -0800 Subject: [PATCH 1/6] Sets specific proportions for book page columns --- bookwyrm/templates/book.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/book.html b/bookwyrm/templates/book.html index d80daca2..ec6c504a 100644 --- a/bookwyrm/templates/book.html +++ b/bookwyrm/templates/book.html @@ -35,7 +35,7 @@
-
+
{% include 'snippets/book_cover.html' with book=book size=large %} {% include 'snippets/rate_action.html' with user=request.user book=book %} {% include 'snippets/shelve_button/shelve_button.html' %} @@ -93,7 +93,7 @@
-
+

{% include 'snippets/stars.html' with rating=rating %} @@ -201,7 +201,7 @@

-
+
{% if book.subjects %}

{% trans "Subjects" %}

From 9c94be8804b3bc7bcdb5c5bfbcb9bba83ffb4972 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 07:35:38 -0800 Subject: [PATCH 2/6] Fixes typo in subject places block --- bookwyrm/templates/book.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/book.html b/bookwyrm/templates/book.html index ec6c504a..c4cede2e 100644 --- a/bookwyrm/templates/book.html +++ b/bookwyrm/templates/book.html @@ -217,7 +217,7 @@

{% trans "Places" %}

    - {% for place in book.subject_placess %} + {% for place in book.subject_places %}
  • {{ place }}
  • {% endfor %}
From e5bdb4b9d1a9ef38ad49227362df28d1d9945099 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 07:35:50 -0800 Subject: [PATCH 3/6] Make empty cover value null --- bookwyrm/activitypub/book.py | 2 +- bookwyrm/tests/actions/__init__.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 bookwyrm/tests/actions/__init__.py diff --git a/bookwyrm/activitypub/book.py b/bookwyrm/activitypub/book.py index 87c40c90..8c32be96 100644 --- a/bookwyrm/activitypub/book.py +++ b/bookwyrm/activitypub/book.py @@ -26,7 +26,7 @@ class Book(ActivityObject): librarythingKey: str = '' goodreadsKey: str = '' - cover: Image = field(default_factory=lambda: {}) + cover: Image = None type: str = 'Book' diff --git a/bookwyrm/tests/actions/__init__.py b/bookwyrm/tests/actions/__init__.py deleted file mode 100644 index b6e690fd..00000000 --- a/bookwyrm/tests/actions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import * From b895059f03f25a866cffde77d600c8a5cb8f3034 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 07:42:02 -0800 Subject: [PATCH 4/6] Uses same alt text generation for books with no cover --- bookwyrm/templates/snippets/book_cover.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/book_cover.html b/bookwyrm/templates/snippets/book_cover.html index 6d15b37f..92137853 100644 --- a/bookwyrm/templates/snippets/book_cover.html +++ b/bookwyrm/templates/snippets/book_cover.html @@ -6,8 +6,7 @@
No cover
-

{{ book.title }}

-

({{ book.edition_info }})

+

{{ book.alt_text }}

{% endif %} From dfecdca6f93bb4f52c4a7ac9f807041fab816495 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 7 Mar 2021 07:56:33 -0800 Subject: [PATCH 5/6] Fixes display of ratings --- bookwyrm/templates/book.html | 4 ++-- bookwyrm/templates/layout.html | 2 +- bookwyrm/templates/snippets/username.html | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bookwyrm/templates/book.html b/bookwyrm/templates/book.html index c4cede2e..06578e89 100644 --- a/bookwyrm/templates/book.html +++ b/bookwyrm/templates/book.html @@ -254,8 +254,8 @@
{% include 'snippets/username.html' with user=rating.user %}
-
-
{% trans "rated it" %}
+
+

{% trans "rated it" %}

{% include 'snippets/stars.html' with rating=rating.rating %}
diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index ee42b4f6..8a708f63 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -79,7 +79,7 @@ aria-controls="navbar-dropdown" > {% include 'snippets/avatar.html' with user=request.user %} - {% include 'snippets/username.html' with user=request.user anchor=false %} + {% include 'snippets/username.html' with user=request.user anchor=false %}
-{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id %} +{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id no_body=True %}