|
|
@ -49,7 +49,7 @@ |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
|
|
|
|
{% if topic.is_text_type and topic.get_content_metadata('excerpt') %} |
|
|
|
{% if topic.content_excerpt %} |
|
|
|
{{ topic_excerpt_expandable(topic) }} |
|
|
|
{% endif %} |
|
|
|
|
|
|
@ -87,11 +87,16 @@ |
|
|
|
{% if topic.is_spoiler %} |
|
|
|
{% set excerpt = 'Warning: this post may contain spoilers' %} |
|
|
|
{% set is_expandable = True %} |
|
|
|
{% else %} |
|
|
|
{% set excerpt = topic.get_content_metadata('excerpt') %} |
|
|
|
|
|
|
|
{# if the excerpt is the full text, it doesn't need to be expandable #} |
|
|
|
{% set is_expandable = excerpt.endswith('...') %} |
|
|
|
{% if topic.is_text_type %} |
|
|
|
{% set full_text = topic.rendered_html|safe %} |
|
|
|
{% else %} |
|
|
|
{% set full_text = topic.content_excerpt %} |
|
|
|
{% endif %} |
|
|
|
{% else %} |
|
|
|
{% set excerpt = topic.content_excerpt %} |
|
|
|
{% set is_expandable = topic.is_content_excerpt_truncated %} |
|
|
|
{% set full_text = topic.rendered_html|safe %} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% if is_expandable %} |
|
|
@ -101,10 +106,10 @@ |
|
|
|
{% endif %} |
|
|
|
> |
|
|
|
<summary><span>{{ excerpt }}</span></summary> |
|
|
|
{{ topic.rendered_html|safe }} |
|
|
|
{{ full_text }} |
|
|
|
</details> |
|
|
|
{% else %} |
|
|
|
<p class="topic-text-excerpt">{{ topic.get_content_metadata('excerpt') }}</p> |
|
|
|
<p class="topic-text-excerpt">{{ excerpt }}</p> |
|
|
|
{% endif %} |
|
|
|
{% endmacro %} |
|
|
|
|
|
|
|