forked from mirrors/bookwyrm
a05b14c338
- Wrap block level elements within block level elements, not inline. - Avoid empty blocks. - Change `<hr>` in lists into allowed type of children. - Fix duplicated ID (some change that was not propagated across the template?). - Make the anchor optional in the navbar (interactive elements (`a`, `input`, `button`…) should not appear into other interactive elements). - Remove redundant `role` on main navigation. - Make the modal a modal with `role="dialog". - Use `button` instead of form-less `label`.
40 lines
1 KiB
HTML
40 lines
1 KiB
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 }}">
|
|
<p dir="auto">{{ trimmed }}</p>
|
|
|
|
<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>
|
|
<div id="full-{{ uuid }}" class="hidden">
|
|
<div class="content">
|
|
<div dir="auto">{{ full }}</div>
|
|
|
|
<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>
|
|
{% else %}
|
|
<div class="content">
|
|
<div dir="auto">{{ full }}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|