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;
}
.time-ago {
float: right;
display: block;
}
.book-preview {
overflow: auto;
}
@ -121,7 +126,6 @@ h2 {
padding: 1rem;
}
.review-form textarea {
width: 30rem;
height: 10rem;

View file

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