Tidy up status display

This commit is contained in:
Mouse Reeve 2020-02-19 18:41:37 -08:00
parent b2baa39ff2
commit aacba3e7cf
3 changed files with 18 additions and 9 deletions

View file

@ -99,6 +99,11 @@ h2 {
bottom: 0.5em; bottom: 0.5em;
} }
.time-ago {
float: right;
display: block;
}
.book-preview { .book-preview {
overflow: auto; overflow: auto;
} }
@ -121,7 +126,6 @@ h2 {
padding: 1rem; padding: 1rem;
} }
.review-form textarea { .review-form textarea {
width: 30rem; width: 30rem;
height: 10rem; height: 10rem;

View file

@ -1,12 +1,7 @@
{% load fr_display %} {% load fr_display %}
<div class="update"> <div class="update">
<h2>
{% include 'snippets/avatar.html' with user=activity.user %}
{% include 'snippets/username.html' with user=activity.user %}
{% if activity.status_type == 'Review' %} {% if activity.status_type == 'Review' %}
{# display a review #} {% include 'snippets/status_banner.html' with content="reviewed <i>"|add:activity.book.data.title|add:"</i>" %}
reviewed {{ activity.book.data.title }}
</h2>
<div class="book-preview review"> <div class="book-preview review">
{% include 'snippets/book.html' with book=activity.book size=large %} {% include 'snippets/book.html' with book=activity.book size=large %}
@ -32,8 +27,8 @@
</form> </form>
</div> </div>
{% elif activity.status_type == 'Note' %} {% elif activity.status_type == 'Note' %}
posted</h2> {% include 'snippets/status_banner.html' %}
{{ activity.content | safe }} <span>{{ activity.content | safe }}</span>
{% for book in activity.mention_books.all %} {% for book in activity.mention_books.all %}
<div class="book-preview review"> <div class="book-preview review">
{% include 'snippets/book.html' with book=book size=large description=True %} {% include 'snippets/book.html' with book=book size=large description=True %}

View file

@ -0,0 +1,10 @@
{% load humanize %}
<h2>
{% include 'snippets/avatar.html' with user=activity.user %}
{% include 'snippets/username.html' with user=activity.user %}
{{ content | safe }}
<span class="time-ago">
{{ activity.created_date | naturaltime }}
</span>
</h2>