add: post warnings
This commit is contained in:
parent
24cf61c783
commit
71d017693c
8 changed files with 151 additions and 12 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue