forked from mirrors/bookwyrm
30 lines
978 B
HTML
30 lines
978 B
HTML
{% load bookwyrm_tags %}
|
|
{% load i18n %}
|
|
|
|
{% with 0|uuid as uuid %}
|
|
{% if full %}
|
|
{% with full|to_markdown|safe as full %}
|
|
|
|
{% with full|to_markdown|safe|truncatewords_html:60 as trimmed %}
|
|
{% if trimmed != full %}
|
|
<div id="hide-full-{{ uuid }}">
|
|
<div class="content" id="trimmed-{{ uuid }}"><span dir="auto">{{ trimmed }}</span>
|
|
{% trans "Show more" as button_text %}
|
|
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="full" controls_uid=uuid class="is-small" %}
|
|
</div>
|
|
</div>
|
|
<div id="full-{{ uuid }}" class="hidden">
|
|
<div class="content"><span dir="auto">{{ full }}</span>
|
|
{% trans "Show less" as button_text %}
|
|
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="full" controls_uid=uuid class="is-small" %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="content"><span dir="auto">{{ full }}</span></div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|