From bb44ede2e75511b18e7c7a2c7c5f2742c39ee0a3 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 24 Apr 2021 12:56:53 -0700 Subject: [PATCH] Show book preview in full statuses on mobile --- .../snippets/status/content_status.html | 15 +- .../snippets/status/status_content.html | 134 ------------------ 2 files changed, 11 insertions(+), 138 deletions(-) delete mode 100644 bookwyrm/templates/snippets/status/status_content.html diff --git a/bookwyrm/templates/snippets/status/content_status.html b/bookwyrm/templates/snippets/status/content_status.html index 5225f04e..b2946b83 100644 --- a/bookwyrm/templates/snippets/status/content_status.html +++ b/bookwyrm/templates/snippets/status/content_status.html @@ -14,10 +14,17 @@ {% if not hide_book %} {% with book=status.book|default:status.mention_books.first %} {% if book %} -
- {% include 'snippets/book_cover.html' with book=book %} - {% include 'snippets/stars.html' with rating=book|rating:request.user %} - {% include 'snippets/shelve_button/shelve_button.html' with book=book %} +
+
+
+ {% include 'snippets/book_cover.html' with book=book %} + {% include 'snippets/stars.html' with rating=book|rating:request.user %} + {% include 'snippets/shelve_button/shelve_button.html' with book=book %} +
+
+

{{ book|book_description|to_markdown|default:""|safe|truncatewords_html:15 }}

+
+
{% endif %} {% endwith %} diff --git a/bookwyrm/templates/snippets/status/status_content.html b/bookwyrm/templates/snippets/status/status_content.html deleted file mode 100644 index fd3c7ee7..00000000 --- a/bookwyrm/templates/snippets/status/status_content.html +++ /dev/null @@ -1,134 +0,0 @@ -{% load bookwyrm_tags %} -{% load i18n %} - -{% with status_type=status.status_type %} -
- {% if status_type == 'Review' or status_type == 'Rating' %} -
- {% if status.name %} -

- {{ status.name|escape }} -

- {% endif %} - - - - - {% if status_type == 'Rating' %} - {# @todo Is it possible to not hard-code the value? #} - - {% endif %} - - - {% include 'snippets/stars.html' with rating=status.rating %} -
- {% endif %} - - {% if status.content_warning %} -
-

{{ status.content_warning }}

- - {% trans "Show more" as button_text %} - - {% with text=button_text class="is-small" controls_text="show-status-cw" controls_uid=status.id %} - {% include 'snippets/toggle/open_button.html' %} - {% endwith %} -
- {% endif %} - - -
- -{% if not hide_book %} - {% if status.book or status.mention_books.count %} -
- {% if status.book %} - {% with book=status.book %} - {% include 'snippets/status/book_preview.html' %} - {% endwith %} - {% elif status.mention_books.count %} - {% with book=status.mention_books.first %} - {% include 'snippets/status/book_preview.html' %} - {% endwith %} - {% endif %} -
- {% endif %} -{% endif %} -{% endwith %}