From aacba3e7cffbcbf1a8b290ff26bba8c9365b2b11 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 19 Feb 2020 18:41:37 -0800 Subject: [PATCH] Tidy up status display --- fedireads/static/format.css | 6 +++++- fedireads/templates/snippets/status.html | 11 +++-------- fedireads/templates/snippets/status_banner.html | 10 ++++++++++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 fedireads/templates/snippets/status_banner.html diff --git a/fedireads/static/format.css b/fedireads/static/format.css index cf65ffe69..2f22571af 100644 --- a/fedireads/static/format.css +++ b/fedireads/static/format.css @@ -99,6 +99,11 @@ h2 { bottom: 0.5em; } +.time-ago { + float: right; + display: block; +} + .book-preview { overflow: auto; } @@ -121,7 +126,6 @@ h2 { padding: 1rem; } - .review-form textarea { width: 30rem; height: 10rem; diff --git a/fedireads/templates/snippets/status.html b/fedireads/templates/snippets/status.html index 641ebab22..fa86b604b 100644 --- a/fedireads/templates/snippets/status.html +++ b/fedireads/templates/snippets/status.html @@ -1,12 +1,7 @@ {% load fr_display %}
-

- {% include 'snippets/avatar.html' with user=activity.user %} - {% include 'snippets/username.html' with user=activity.user %} {% if activity.status_type == 'Review' %} - {# display a review #} - reviewed {{ activity.book.data.title }} -

+ {% include 'snippets/status_banner.html' with content="reviewed "|add:activity.book.data.title|add:"" %}
{% include 'snippets/book.html' with book=activity.book size=large %} @@ -32,8 +27,8 @@
{% elif activity.status_type == 'Note' %} - posted - {{ activity.content | safe }} + {% include 'snippets/status_banner.html' %} + {{ activity.content | safe }} {% for book in activity.mention_books.all %}
{% include 'snippets/book.html' with book=book size=large description=True %} diff --git a/fedireads/templates/snippets/status_banner.html b/fedireads/templates/snippets/status_banner.html new file mode 100644 index 000000000..fac1e532d --- /dev/null +++ b/fedireads/templates/snippets/status_banner.html @@ -0,0 +1,10 @@ +{% load humanize %} +

+ {% include 'snippets/avatar.html' with user=activity.user %} + {% include 'snippets/username.html' with user=activity.user %} + {{ content | safe }} + + {{ activity.created_date | naturaltime }} + +

+