2020-12-13 02:25:04 +00:00
|
|
|
{% load bookwyrm_tags %}
|
2021-03-01 01:10:30 +00:00
|
|
|
{% load i18n %}
|
|
|
|
|
2020-11-12 19:40:20 +00:00
|
|
|
{% with 0|uuid as uuid %}
|
2021-04-09 21:57:49 +00:00
|
|
|
{% if full %}
|
|
|
|
{% with full|to_markdown|safe as full %}
|
2021-04-20 16:56:01 +00:00
|
|
|
{% with full|to_markdown|safe|truncatewords_html:150 as trimmed %}
|
2021-04-09 21:57:49 +00:00
|
|
|
{% if not no_trim and trimmed != full %}
|
|
|
|
<div id="hide-full-{{ uuid }}">
|
|
|
|
<div class="content" id="trimmed-{{ uuid }}">
|
|
|
|
<div dir="auto">{{ trimmed }}</div>
|
2020-11-12 19:40:20 +00:00
|
|
|
|
2021-04-09 21:57:49 +00:00
|
|
|
<div>
|
|
|
|
{% 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>
|
2021-04-10 17:57:23 +00:00
|
|
|
<div id="full-{{ uuid }}" class="is-hidden">
|
2021-04-09 21:57:49 +00:00
|
|
|
<div class="content">
|
|
|
|
<div
|
|
|
|
dir="auto"
|
|
|
|
{% if itemprop %}itemprop="{{ itemprop }}{% endif %}"
|
|
|
|
>
|
|
|
|
{{ full }}
|
|
|
|
</div>
|
2020-11-12 19:40:20 +00:00
|
|
|
|
2021-04-09 21:57:49 +00:00
|
|
|
<div>
|
|
|
|
{% 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>
|
|
|
|
</div>
|
2021-04-10 17:57:23 +00:00
|
|
|
{% else %}
|
2021-04-09 21:57:49 +00:00
|
|
|
<div class="content">
|
|
|
|
<div
|
|
|
|
dir="auto"
|
|
|
|
{% if itemprop %}itemprop="{{ itemprop }}{% endif %}"
|
|
|
|
>
|
|
|
|
{{ full }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
2021-01-31 16:41:11 +00:00
|
|
|
{% endwith %}
|