moviewyrm/bookwyrm/templates/snippets/status_content.html
2021-01-14 13:35:09 -08:00

67 lines
2.9 KiB
HTML

{% load bookwyrm_tags %}
<div class="block">
{% if status.status_type == 'Review' %}
<div>
<h3 class="title is-5 has-subtitle">
{% if status.name %}<span dir="auto">{{ status.name }}</span><br>{% endif %}
</h3>
<p class="subtitle">{% include 'snippets/stars.html' with rating=status.rating %}</p>
</div>
{% endif %}
{% if status.content_warning %}
<div class="toggle-content">
<p>{{ status.content_warning }}</p>
<input class="toggle-control" type="radio" name="toggle-status-cw-{{ status.id }}" id="hide-status-cw-{{ status.id }}" checked>
<div class="toggle-content hidden">
{% include 'snippets/toggle/toggle_button.html' with text="Show More" small=True controls_text="show-status-cw" controls_uid=status.id %}
</div>
</div>
<input class="toggle-control" type="radio" name="toggle-status-cw-{{ status.id }}" id="show-status-cw-{{ status.id }}">
{% endif %}
<div{% if status.content_warning %} class="toggle-content hidden"{% endif %}>
{% if status.content_warning %}
{% include 'snippets/toggle/toggle_button.html' with text="Show Less" small=True controls_text="hide-status-cw" controls_uid=status.id %}
{% endif %}
{% if status.quote %}
<div class="quote block">
<blockquote dir="auto">{{ status.quote | safe }}</blockquote>
<p> &mdash; {% include 'snippets/book_titleby.html' with book=status.book %}</p>
</div>
{% endif %}
{% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %}
{% include 'snippets/trimmed_text.html' with full=status.content|safe %}
{% endif %}
{% if status.attachments %}
<div class="block">
<div class="columns">
{% for attachment in status.attachments.all %}
<div class="column is-narrow">
<figure class="image is-128x128">
<a href="/images/{{ attachment.image }}" target="_blank" aria-label="open image in new window">
<img src="/images/{{ attachment.image }}"{% if attachment.caption %} alt="{{ attachment.caption }}" title="{{ attachment.caption }}"{% endif %}>
</a>
</figure>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
{% if not hide_book %}
{% if status.book or status.mention_books.count %}
<div class="{% if status.status_type != 'GeneratedNote' %}box has-background-white-bis{% endif %}">
{% if status.book %}
{% include 'snippets/book_preview.html' with book=status.book %}
{% elif status.mention_books.count %}
{% include 'snippets/book_preview.html' with book=status.mention_books.first %}
{% endif %}
</div>
{% endif %}
{% endif %}