diff --git a/tildes/tildes/templates/macros/topics.jinja2 b/tildes/tildes/templates/macros/topics.jinja2 index 5ad4112..4519847 100644 --- a/tildes/tildes/templates/macros/topics.jinja2 +++ b/tildes/tildes/templates/macros/topics.jinja2 @@ -47,20 +47,30 @@ {% if topic.is_text_type and topic.get_content_metadata('excerpt') %} - {# if the "excerpt" is the full text, don't wrap in
#} - {% if not topic.get_content_metadata('excerpt').endswith('...') %} -

{{ topic.get_content_metadata('excerpt') }}

- {% else %} -
+ {# warn about spoilers #} + {% if 'spoiler' in topic.tags %} +
- {{ topic.get_content_metadata('excerpt') }} + Warning: this post may contain spoilers. {{ topic.rendered_html|safe }}
+ {% else %} + {# if the "excerpt" is the full text, don't wrap in
#} + {% if not topic.get_content_metadata('excerpt').endswith('...') %} +

{{ topic.get_content_metadata('excerpt') }}

+ {% else %} +
+ + {{ topic.get_content_metadata('excerpt') }} + + {{ topic.rendered_html|safe }} +
+ {% endif %} {% endif %} {% endif %}