2022-01-18 20:28:59 +00:00
|
|
|
{% load book_display_tags %}
|
2022-01-18 20:07:46 +00:00
|
|
|
{% load rating_tags %}
|
2021-05-11 22:14:42 +00:00
|
|
|
{% load markdown %}
|
2021-04-20 16:54:02 +00:00
|
|
|
{% load i18n %}
|
2021-06-07 16:13:24 +00:00
|
|
|
{% load static %}
|
2021-09-05 23:00:40 +00:00
|
|
|
{% load humanize %}
|
2021-04-20 16:54:02 +00:00
|
|
|
|
|
|
|
{% with status_type=status.status_type %}
|
|
|
|
<div
|
|
|
|
class="block"
|
2021-04-20 18:06:14 +00:00
|
|
|
{% if status_type == "Review" %}
|
|
|
|
itemprop="rating"
|
|
|
|
itemtype="https://schema.org/Rating"
|
|
|
|
{% endif %}
|
2021-04-20 16:54:02 +00:00
|
|
|
>
|
|
|
|
|
2021-04-27 12:58:30 +00:00
|
|
|
<div class="columns is-gapless">
|
2021-04-20 18:06:14 +00:00
|
|
|
{% if not hide_book %}
|
2021-04-27 12:58:30 +00:00
|
|
|
{% with book=status.book|default:status.mention_books.first %}
|
|
|
|
{% if book %}
|
|
|
|
<div class="column is-cover">
|
|
|
|
<div class="columns is-mobile is-gapless">
|
|
|
|
<div class="column is-cover">
|
2021-05-24 14:18:05 +00:00
|
|
|
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book cover_class='is-w-s-mobile is-h-l-tablet' size_mobile='medium' size='large' %}</a>
|
2021-04-27 12:58:30 +00:00
|
|
|
|
|
|
|
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
|
|
|
|
|
|
|
|
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="column ml-3-mobile is-hidden-tablet">
|
|
|
|
<p>{{ book|book_description|to_markdown|default:""|safe|truncatewords_html:15 }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2021-04-20 16:54:02 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2022-03-26 18:00:53 +00:00
|
|
|
<article class="column ml-3-tablet my-3-mobile is-clipped">
|
2021-04-20 18:06:14 +00:00
|
|
|
{% if status_type == 'Review' %}
|
|
|
|
<header class="mb-2">
|
|
|
|
<h3
|
|
|
|
class="title is-5 has-subtitle"
|
|
|
|
dir="auto"
|
|
|
|
itemprop="name"
|
|
|
|
>
|
|
|
|
{{ status.name|escape }}
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<h4 class="subtitle is-6">
|
|
|
|
<span
|
|
|
|
class="is-hidden"
|
|
|
|
{% if status_type == "Review" %}
|
|
|
|
itemprop="reviewRating"
|
|
|
|
itemscope
|
|
|
|
itemtype="https://schema.org/Rating"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
|
|
|
|
|
|
|
|
{# @todo Is it possible to not hard-code the value? #}
|
|
|
|
<meta itemprop="bestRating" content="5">
|
|
|
|
</span>
|
|
|
|
{% include 'snippets/stars.html' with rating=status.rating %}
|
|
|
|
</h4>
|
|
|
|
</header>
|
2021-04-20 16:54:02 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-04-20 18:06:14 +00:00
|
|
|
{% if status.content_warning %}
|
2021-09-19 16:30:06 +00:00
|
|
|
<div class="notification p-2 is-clearfix is-warning is-light">
|
|
|
|
<p class="is-pulled-left is-flex">
|
|
|
|
{% trans "Content warning" as text %}
|
|
|
|
<span class="icon icon-warning" title="{{ text }}">
|
|
|
|
<span class="is-sr-only">{{ text }}</span>
|
|
|
|
</span>
|
2021-09-19 00:00:01 +00:00
|
|
|
{{ status.content_warning }}
|
|
|
|
</p>
|
2021-04-20 16:54:02 +00:00
|
|
|
|
2021-09-19 00:00:01 +00:00
|
|
|
{% trans "Show status" as button_text %}
|
2021-04-20 16:54:02 +00:00
|
|
|
|
2021-09-19 00:00:01 +00:00
|
|
|
{% with text=button_text class="is-small is-pulled-right" icon_with_text="arrow-down" controls_text="show_status_cw" controls_uid=status.id %}
|
2021-04-20 18:06:14 +00:00
|
|
|
{% include 'snippets/toggle/open_button.html' %}
|
|
|
|
{% endwith %}
|
2021-04-20 16:54:02 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2021-04-20 18:06:14 +00:00
|
|
|
<div
|
|
|
|
{% if status.content_warning %}
|
2021-08-09 01:40:47 +00:00
|
|
|
id="show_status_cw_{{ status.id }}"
|
2021-04-20 18:06:14 +00:00
|
|
|
class="is-hidden"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
{% if status.quote %}
|
|
|
|
<div class="quote block">
|
2021-09-22 19:18:12 +00:00
|
|
|
<blockquote dir="auto" class="content mb-2 preserve-whitespace">{{ status.quote|safe }}</blockquote>
|
2021-04-20 18:06:14 +00:00
|
|
|
|
2021-09-05 23:00:40 +00:00
|
|
|
<p>
|
|
|
|
— {% include 'snippets/book_titleby.html' with book=status.book %}
|
|
|
|
{% if status.position %}
|
|
|
|
{% if status.position_mode == 'PG' %}
|
|
|
|
{% blocktrans with page=status.position|intcomma %}(Page {{ page }}){% endblocktrans %}
|
|
|
|
{% else %}
|
|
|
|
{% blocktrans with percent=status.position %}({{ percent }}%){% endblocktrans %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</p>
|
2021-04-20 18:06:14 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if status.content and status_type != 'GeneratedNote' and status_type != 'Announce' %}
|
|
|
|
{% with full=status.content|safe no_trim=status.content_warning itemprop="reviewBody" %}
|
|
|
|
{% include 'snippets/trimmed_text.html' %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if status.attachments.exists %}
|
|
|
|
<div class="block">
|
|
|
|
<div class="columns">
|
|
|
|
{% for attachment in status.attachments.all %}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<figure class="image is-128x128">
|
|
|
|
<a
|
2021-06-07 16:13:24 +00:00
|
|
|
href="{% get_media_prefix %}{{ attachment.image }}"
|
2021-04-20 18:06:14 +00:00
|
|
|
target="_blank"
|
|
|
|
aria-label="{% trans 'Open image in new window' %}"
|
2021-04-20 16:54:02 +00:00
|
|
|
>
|
2021-04-20 18:06:14 +00:00
|
|
|
<img
|
2021-06-07 16:13:24 +00:00
|
|
|
src="{% get_media_prefix %}{{ attachment.image }}"
|
2021-04-20 18:06:14 +00:00
|
|
|
|
|
|
|
{% if attachment.caption %}
|
|
|
|
alt="{{ attachment.caption }}"
|
|
|
|
title="{{ attachment.caption }}"
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
</a>
|
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2021-04-20 16:54:02 +00:00
|
|
|
</div>
|
2021-04-20 18:06:14 +00:00
|
|
|
{% endif %}
|
2021-09-19 00:00:01 +00:00
|
|
|
|
|
|
|
{% if status.content_warning %}
|
|
|
|
{% trans "Hide status" as button_text %}
|
|
|
|
|
|
|
|
{% with text=button_text class="is-small" controls_text="show_status_cw" controls_uid=status.id icon_with_text="arrow-up" %}
|
|
|
|
{% include 'snippets/toggle/close_button.html' %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
2021-04-20 18:06:14 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</div>
|
2021-04-20 16:54:02 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endwith %}
|
2021-04-20 21:02:23 +00:00
|
|
|
|