2020-12-13 02:25:04 +00:00
|
|
|
{% load bookwyrm_tags %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-04-21 19:48:19 +00:00
|
|
|
{% load humanize %}
|
2021-04-09 21:57:49 +00:00
|
|
|
|
2021-04-21 15:32:35 +00:00
|
|
|
<div class="media">
|
2021-04-23 16:38:33 +00:00
|
|
|
<figure class="media-left" aria-hidden="true">
|
2021-04-21 15:32:35 +00:00
|
|
|
<a class="image is-48x48" href="{{ status.user.local_path }}">
|
|
|
|
{% include 'snippets/avatar.html' with user=status.user ariaHide="true" medium="true" %}
|
2021-04-26 18:33:17 +00:00
|
|
|
</a>
|
2021-04-21 15:32:35 +00:00
|
|
|
</figure>
|
2020-04-01 21:55:32 +00:00
|
|
|
|
2021-04-21 15:32:35 +00:00
|
|
|
<div class="media-content">
|
2021-04-21 20:30:52 +00:00
|
|
|
<h3 class="has-text-weight-bold">
|
2021-04-21 19:48:19 +00:00
|
|
|
<span
|
|
|
|
itemprop="author"
|
|
|
|
itemscope
|
|
|
|
itemtype="https://schema.org/Person"
|
2021-04-21 15:32:35 +00:00
|
|
|
>
|
2021-04-23 16:38:33 +00:00
|
|
|
{% if status.user.avatar %}
|
|
|
|
<meta itemprop="image" content="/images/{{ status.user.avatar }}">
|
|
|
|
{% endif %}
|
|
|
|
|
2021-04-21 19:48:19 +00:00
|
|
|
<a
|
|
|
|
href="{{ status.user.local_path }}"
|
|
|
|
itemprop="url"
|
|
|
|
>
|
|
|
|
<span itemprop="name">{{ status.user.display_name }}</span>
|
|
|
|
</a>
|
|
|
|
</span>
|
2021-04-20 18:06:14 +00:00
|
|
|
|
2021-04-21 19:48:19 +00:00
|
|
|
{% if status.status_type == 'GeneratedNote' %}
|
|
|
|
{{ status.content | safe }}
|
|
|
|
{% elif status.status_type == 'Rating' %}
|
|
|
|
{% trans "rated" %}
|
|
|
|
{% elif status.status_type == 'Review' %}
|
|
|
|
{% trans "reviewed" %}
|
|
|
|
{% elif status.status_type == 'Comment' %}
|
|
|
|
{% trans "commented on" %}
|
|
|
|
{% elif status.status_type == 'Quotation' %}
|
|
|
|
{% trans "quoted" %}
|
|
|
|
{% elif status.reply_parent %}
|
|
|
|
{% with parent_status=status|parent %}
|
2021-04-21 15:32:35 +00:00
|
|
|
|
2021-04-24 18:47:39 +00:00
|
|
|
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">status</a>{% endblocktrans %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
2021-04-24 18:39:54 +00:00
|
|
|
|
2021-04-24 18:47:39 +00:00
|
|
|
{% if status.book %}
|
|
|
|
{% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %}
|
2021-04-26 18:33:17 +00:00
|
|
|
<a href="/book/{{ status.book.id }}">{{ status.book|title }}</a>{% if status.status_type == 'Rating' %}: {% include 'snippets/stars.html' with rating=status.rating %}
|
2021-04-24 18:47:39 +00:00
|
|
|
<span
|
|
|
|
itemprop="reviewRating"
|
|
|
|
itemscope
|
|
|
|
itemtype="https://schema.org/Rating"
|
|
|
|
>
|
|
|
|
<span class="is-hidden" {{ rating_type }}>
|
|
|
|
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
|
2021-04-21 15:32:35 +00:00
|
|
|
|
2021-04-24 18:47:39 +00:00
|
|
|
{% if status.book %}
|
|
|
|
{% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %}
|
|
|
|
<a href="/book/{{ status.book.id }}">{{ status.book|title }}</a>{% if status.status_type == 'Rating' %}:
|
|
|
|
<span
|
|
|
|
itemprop="reviewRating"
|
|
|
|
itemscope
|
|
|
|
itemtype="https://schema.org/Rating"
|
|
|
|
>
|
|
|
|
<span class="is-hidden" {{ rating_type }}>
|
|
|
|
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
|
2021-04-21 15:32:35 +00:00
|
|
|
|
2021-04-24 18:47:39 +00:00
|
|
|
{# @todo Is it possible to not hard-code the value? #}
|
|
|
|
<meta itemprop="bestRating" content="5">
|
|
|
|
</span>
|
2021-04-21 15:32:35 +00:00
|
|
|
|
2021-04-24 18:47:39 +00:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/book_titleby.html' with book=status.book %}
|
2021-04-24 18:07:13 +00:00
|
|
|
{% endif %}
|
2021-04-24 18:47:39 +00:00
|
|
|
{% elif status.mention_books %}
|
|
|
|
<a href="/book/{{ status.mention_books.first.id }}">
|
|
|
|
{{ status.mention_books.first.title }}
|
|
|
|
</a>
|
2021-04-24 18:07:13 +00:00
|
|
|
{% endif %}
|
2021-04-24 18:47:39 +00:00
|
|
|
{% include 'snippets/stars.html' with rating=status.rating %}
|
2021-04-21 19:48:19 +00:00
|
|
|
{% endif %}
|
2021-04-24 18:47:39 +00:00
|
|
|
{% else %}
|
|
|
|
{% include 'snippets/book_titleby.html' with book=status.book %}
|
2021-04-21 15:32:35 +00:00
|
|
|
{% endif %}
|
2021-04-24 18:47:39 +00:00
|
|
|
{% elif status.mention_books %}
|
|
|
|
<a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first|title }}</a>
|
2021-04-21 19:48:19 +00:00
|
|
|
{% endif %}
|
2021-03-21 01:03:20 +00:00
|
|
|
|
2021-04-21 20:30:52 +00:00
|
|
|
</h3>
|
2021-04-21 19:48:19 +00:00
|
|
|
<p class="is-size-7 is-flex is-align-items-center">
|
|
|
|
<a href="{{ status.remote_id }}">{{ status.published_date|timesince }}</a>
|
|
|
|
{% if status.progress %}
|
2021-04-21 20:32:26 +00:00
|
|
|
<span class="ml-1">
|
|
|
|
{% if status.progress_mode == 'PG' %}
|
|
|
|
({% include 'snippets/page_text.html' with page=status.progress total_pages=status.book.pages %})
|
2021-04-21 15:32:35 +00:00
|
|
|
{% else %}
|
2021-04-21 20:32:26 +00:00
|
|
|
({{ status.progress }}%)
|
|
|
|
{% endif %}
|
2021-04-21 19:48:19 +00:00
|
|
|
</span>
|
2021-04-21 15:32:35 +00:00
|
|
|
{% endif %}
|
2021-04-21 19:48:19 +00:00
|
|
|
{% include 'snippets/privacy-icons.html' with item=status %}
|
2021-04-21 15:32:35 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|