add: post warnings

This commit is contained in:
trisua 2025-05-06 15:48:03 -04:00
parent 24cf61c783
commit 71d017693c
8 changed files with 151 additions and 12 deletions

View file

@ -227,9 +227,24 @@ and show_community and community.id != config.town_square or question %}
{% endif %}
</div>
{% if not post.context.content_warning %}
<span id="post-content:{{ post.id }}" class="no_p_margin"
>{{ post.content|markdown|safe }}</span
>
{% else %}
<details>
<summary
class="card flex gap-2 items-center secondary red w-full"
>
{{ icon "triangle-alert" }}
<b>{{ post.context.content_warning }}</b>
</summary>
<span id="post-content:{{ post.id }}" class="no_p_margin"
>{{ post.content|markdown|safe }}</span
>
</details>
{% endif %}
</div>
</div>