2020-10-31 21:18:56 +00:00
|
|
|
{% load fr_display %}
|
2020-11-02 19:46:23 +00:00
|
|
|
{% with book.id|uuid as uuid %}
|
2020-10-31 21:18:56 +00:00
|
|
|
{% with book|book_description as full %}
|
2020-11-01 20:09:39 +00:00
|
|
|
{% if full %}
|
2020-10-31 21:18:56 +00:00
|
|
|
{% 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>
|
2020-10-31 21:18:56 +00:00
|
|
|
<blockquote class="content toggle-content hidden">{{ trimmed }}
|
2020-11-10 00:28:38 +00:00
|
|
|
<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>
|
2020-10-31 21:18:56 +00:00
|
|
|
</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">
|
2020-10-31 21:18:56 +00:00
|
|
|
<blockquote class="content toggle-content hidden">{{ full }}
|
2020-11-10 00:28:38 +00:00
|
|
|
<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>
|
2020-10-31 21:18:56 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<blockquote class="content">{{ full }}
|
|
|
|
</blockquote>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2020-11-01 20:09:39 +00:00
|
|
|
{% endif %}
|
2020-10-31 21:18:56 +00:00
|
|
|
{% endwith %}
|
2020-11-02 19:46:23 +00:00
|
|
|
{% endwith %}
|