forked from mirrors/bookwyrm
26 lines
1.1 KiB
HTML
26 lines
1.1 KiB
HTML
{% load bookwyrm_tags %}
|
|
{% with 0|uuid as uuid %}
|
|
{% if full %}
|
|
|
|
{% with full|truncatewords_html:60 as trimmed %}
|
|
{% if trimmed != full %}
|
|
<div>
|
|
<input type="radio" name="show-hide-{{ uuid }}" id="show-{{ uuid }}" class="toggle-control" checked>
|
|
<blockquote class="content toggle-content hidden"><span dir="auto">{{ trimmed | to_markdown | safe }}</span>
|
|
{% include 'snippets/toggle/toggle_button.html' with text="show more" controls_text="hide" controls_uid=uuid class="has-text-link is-clickable" %}
|
|
</blockquote>
|
|
</div>
|
|
<div>
|
|
<input type="radio" name="show-hide-{{ uuid }}" id="hide-{{ uuid }}" class="toggle-control">
|
|
<blockquote class="content toggle-content hidden"><span dir="auto">{{ full | to_markdown | safe }}</span>
|
|
{% include 'snippets/toggle/toggle_button.html' with text="show less" controls_text="show" controls_uid=uuid class="has-text-link is-clickable" %}
|
|
</blockquote>
|
|
</div>
|
|
{% else %}
|
|
<blockquote class="content"><span dir="auto">{{ full | to_markdown | safe }}</span></blockquote>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
{% endwith %}
|
|
|