moviewyrm/bookwyrm/templates/snippets/book_description.html

27 lines
1.1 KiB
HTML
Raw Normal View History

{% load fr_display %}
2020-11-02 19:46:23 +00:00
{% with book.id|uuid as uuid %}
{% with book|book_description as full %}
2020-11-01 20:09:39 +00:00
{% if full %}
{% with full|text_overflow as trimmed %}
{% if trimmed != full %}
<div>
2020-11-02 19:46:23 +00:00
<input type="radio" name="show-hide-{{ book.id }}-{{ uuid }}" id="show-{{ book.id }}-{{ uuid }}" class="toggle-control" checked>
<blockquote class="content toggle-content hidden">{{ trimmed }}
<label class="button is-small" for="hide-{{ book.id }}-{{ uuid }}"><div role="button" tabindex="0">show more</div></label>
2020-11-10 00:16:57 +00:00
</blockquote>
</div>
<div>
2020-11-02 19:46:23 +00:00
<input type="radio" name="show-hide-{{ book.id }}-{{ uuid }}" id="hide-{{ book.id }}-{{ uuid }}" class="toggle-control">
<blockquote class="content toggle-content hidden">{{ full }}
<label class="button is-small" for="show-{{ book.id }}-{{ uuid }}"><div role="button" tabindex="0">show less</div></label>
2020-11-10 00:16:57 +00:00
</blockquote>
</div>
{% else %}
<blockquote class="content">{{ full }}
</blockquote>
{% endif %}
{% endwith %}
2020-11-01 20:09:39 +00:00
{% endif %}
{% endwith %}
2020-11-02 19:46:23 +00:00
{% endwith %}