mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-29 11:30:39 +00:00
Display status cw's
This commit is contained in:
parent
b796686483
commit
0d42b9cf8f
1 changed files with 47 additions and 30 deletions
|
@ -1,38 +1,55 @@
|
|||
{% load bookwyrm_tags %}
|
||||
<div class="block">
|
||||
{% if status.status_type == 'Review' %}
|
||||
<h3>
|
||||
{% if status.name %}{{ status.name }}<br>{% endif %}
|
||||
{% include 'snippets/stars.html' with rating=status.rating %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if status.quote %}
|
||||
<div class="quote block">
|
||||
<blockquote>{{ status.quote }}</blockquote>
|
||||
|
||||
<p> — {% 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 }}" alt="{{ attachment.caption }}">
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% 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">
|
||||
<label class="button is-small" for="show-status-cw-{{ status.id }}" tabindex="0" role="button">Show More</label>
|
||||
</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 %}
|
||||
<label class="button is-small" for="hide-status-cw-{{ status.id }}" tabindex="0" role="button">Show Less</label>
|
||||
{% endif %}
|
||||
|
||||
{% if status.status_type == 'Review' %}
|
||||
<h3>
|
||||
{% if status.name %}{{ status.name }}<br>{% endif %}
|
||||
{% include 'snippets/stars.html' with rating=status.rating %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
{% if status.quote %}
|
||||
<div class="quote block">
|
||||
<blockquote>{{ status.quote }}</blockquote>
|
||||
|
||||
<p> — {% 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 }}" alt="{{ attachment.caption }}">
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not hide_book %}
|
||||
|
|
Loading…
Reference in a new issue