From 2a606eec3e6307be33a5af0ed91c210838c830b8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 15:27:37 -0700 Subject: [PATCH 1/7] scroll horizontally on user page shelf preview --- bookwyrm/templates/user/user.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/user/user.html b/bookwyrm/templates/user/user.html index d2e9be3e..c86eb631 100644 --- a/bookwyrm/templates/user/user.html +++ b/bookwyrm/templates/user/user.html @@ -26,7 +26,7 @@

{% include 'user/shelf/books_header.html' %}

-
+
{% for shelf in shelves %}

{{ shelf.name }} From 5a236e333f6b13e058b61d31690d2f7b5db70af6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 15:33:03 -0700 Subject: [PATCH 2/7] Fixes directory profile link --- bookwyrm/templates/directory/directory.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/directory/directory.html b/bookwyrm/templates/directory/directory.html index 88a7b15c..b900cb18 100644 --- a/bookwyrm/templates/directory/directory.html +++ b/bookwyrm/templates/directory/directory.html @@ -20,8 +20,8 @@ {% csrf_token %}

- {% url 'settings-profile' as path %} - {% blocktrans %}You can opt-out at any time in your profile settings.{% endblocktrans %} + {% url 'prefs-profile' as path %} + {% blocktrans with path=path %}You can opt-out at any time in your profile settings.{% endblocktrans %}

From f307edf73236b82bb4b6fe09fa94cbb456b06472 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 15:39:54 -0700 Subject: [PATCH 3/7] Use elided page range for invites --- bookwyrm/views/invite.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bookwyrm/views/invite.py b/bookwyrm/views/invite.py index 92f930f4..3b9fd17c 100644 --- a/bookwyrm/views/invite.py +++ b/bookwyrm/views/invite.py @@ -37,8 +37,12 @@ class ManageInvites(View): PAGE_LENGTH, ) + page = paginated.get_page(request.GET.get("page")) data = { - "invites": paginated.get_page(request.GET.get("page")), + "invites": page, + "page_range": paginated.get_elided_page_range( + page.number, on_each_side=2, on_ends=1 + ), "form": forms.CreateInviteForm(), } return TemplateResponse(request, "settings/manage_invites.html", data) @@ -118,15 +122,16 @@ class ManageInviteRequests(View): reduce(operator.or_, (Q(**f) for f in filters)) ).distinct() - paginated = Paginator( - requests, - PAGE_LENGTH, - ) + paginated = Paginator(requests, PAGE_LENGTH) + page = paginated.get_page(request.GET.get("page")) data = { "ignored": ignored, "count": paginated.count, - "requests": paginated.get_page(request.GET.get("page")), + "requests": page, + "page_range": paginated.get_elided_page_range( + page.number, on_each_side=2, on_ends=1 + ), "sort": sort, } return TemplateResponse(request, "settings/manage_invite_requests.html", data) From fe2309f0bc64c446c972bac4490e59b3a51d15ae Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 15:45:39 -0700 Subject: [PATCH 4/7] Fixes orientation of edition want to read menu --- bookwyrm/templates/book/editions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/book/editions.html b/bookwyrm/templates/book/editions.html index 0d5c1044..e2a0bdda 100644 --- a/bookwyrm/templates/book/editions.html +++ b/bookwyrm/templates/book/editions.html @@ -40,7 +40,7 @@
- {% include 'snippets/shelve_button/shelve_button.html' with book=book switch_mode=True %} + {% include 'snippets/shelve_button/shelve_button.html' with book=book switch_mode=True right=True %}
{% endfor %} From a82bf99bd602e3aa7679ad3ce66279112e3621a4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 15:55:26 -0700 Subject: [PATCH 5/7] Icon-only link display on mobile for text links --- bookwyrm/templates/author/author.html | 2 +- bookwyrm/templates/book/book.html | 2 +- bookwyrm/templates/settings/federation.html | 2 +- bookwyrm/templates/user/user.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index f4f308f2..0bc42775 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -15,7 +15,7 @@ {% endif %} diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index a48120e9..ea5ec09a 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -36,7 +36,7 @@ {% endif %} diff --git a/bookwyrm/templates/settings/federation.html b/bookwyrm/templates/settings/federation.html index 208ecf8d..e0a9ba73 100644 --- a/bookwyrm/templates/settings/federation.html +++ b/bookwyrm/templates/settings/federation.html @@ -7,7 +7,7 @@ {% block edit-button %} - {% trans "Add instance" %} + {% trans "Add instance" %} {% endblock %} diff --git a/bookwyrm/templates/user/user.html b/bookwyrm/templates/user/user.html index c86eb631..2c9d7277 100644 --- a/bookwyrm/templates/user/user.html +++ b/bookwyrm/templates/user/user.html @@ -13,7 +13,7 @@ {% endif %} @@ -60,7 +60,7 @@ From 3600f6ca3c8363cb7c64bcf669fbba00dc95e23f Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 16:00:17 -0700 Subject: [PATCH 6/7] Handle overflow text in notifications --- bookwyrm/templates/notifications.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/notifications.html b/bookwyrm/templates/notifications.html index a51b2fdb..ae5cd67b 100644 --- a/bookwyrm/templates/notifications.html +++ b/bookwyrm/templates/notifications.html @@ -56,7 +56,7 @@ {% endif %} -
+

{# DESCRIPTION #} @@ -137,7 +137,7 @@ {# PREVIEW #}

-
+
{% include 'snippets/status_preview.html' with status=related_status %}
From c4f7f34ad40a93950c2a3889528c136b1669b46e Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 14 Jun 2021 16:04:58 -0700 Subject: [PATCH 7/7] Fixes edit readthrough toggle display --- bookwyrm/templates/book/book.html | 2 +- bookwyrm/templates/{snippets => book}/readthrough.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename bookwyrm/templates/{snippets => book}/readthrough.html (97%) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index ea5ec09a..dd5a4ff3 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -180,7 +180,7 @@

{% trans "You don't have any reading activity for this book." %}

{% endif %} {% for readthrough in readthroughs %} - {% include 'snippets/readthrough.html' with readthrough=readthrough %} + {% include 'book/readthrough.html' with readthrough=readthrough %} {% endfor %} diff --git a/bookwyrm/templates/snippets/readthrough.html b/bookwyrm/templates/book/readthrough.html similarity index 97% rename from bookwyrm/templates/snippets/readthrough.html rename to bookwyrm/templates/book/readthrough.html index d5e79b86..75140746 100644 --- a/bookwyrm/templates/snippets/readthrough.html +++ b/bookwyrm/templates/book/readthrough.html @@ -1,8 +1,8 @@ {% load i18n %} {% load humanize %} {% load tz %} -
-
+
+
{% trans "Progress Updates:" %}