Use content warnings in notifications

This commit is contained in:
Mouse Reeve 2022-07-09 13:12:46 -07:00
parent 11a0c1691b
commit be5e1be5f6

View file

@ -1,4 +1,17 @@
{% if status.content %} {% load i18n %}
{% if status.content_warning %}
{% trans "Content warning" as text %}
<span>
<span class="icon icon-warning is-size-5" title="{{ text }}">
<span class="is-sr-only">{{ text }}</span>
</span>
<a href="{{ status.local_path }}">
{{ status.content_warning }}
</a>
</span>
{% elif status.content %}
<a href="{{ status.local_path }}"> <a href="{{ status.local_path }}">
{{ status.content | safe | truncatewords_html:10 }}{% if status.mention_books %} <em>{{ status.mention_books.first.title }}</em>{% endif %} {{ status.content | safe | truncatewords_html:10 }}{% if status.mention_books %} <em>{{ status.mention_books.first.title }}</em>{% endif %}
</a> </a>