Visually differentiates content warnings from statuses

This commit is contained in:
Mouse Reeve 2021-09-18 17:00:01 -07:00
parent b1984aeaf7
commit e6c2ea1fbf
1 changed files with 15 additions and 12 deletions

View File

@ -67,12 +67,15 @@
{% endif %} {% endif %}
{% if status.content_warning %} {% if status.content_warning %}
<div> <div class="notification pt-2 pb-2 is-clearfix is-warning is-light">
<p>{{ status.content_warning }}</p> <p class="is-pulled-left">
<strong>{% trans "Content warning:" %}</strong>
{{ status.content_warning }}
</p>
{% trans "Show more" as button_text %} {% trans "Show status" as button_text %}
{% with text=button_text class="is-small" controls_text="show_status_cw" controls_uid=status.id %} {% with text=button_text class="is-small is-pulled-right" icon_with_text="arrow-down" controls_text="show_status_cw" controls_uid=status.id %}
{% include 'snippets/toggle/open_button.html' %} {% include 'snippets/toggle/open_button.html' %}
{% endwith %} {% endwith %}
</div> </div>
@ -84,14 +87,6 @@
class="is-hidden" class="is-hidden"
{% endif %} {% endif %}
> >
{% if status.content_warning %}
{% trans "Show less" as button_text %}
{% with text=button_text class="is-small" controls_text="show_status_cw" controls_uid=status.id %}
{% include 'snippets/toggle/close_button.html' %}
{% endwith %}
{% endif %}
{% if status.quote %} {% if status.quote %}
<div class="quote block"> <div class="quote block">
<blockquote dir="auto" class="content mb-2">{{ status.quote|safe }}</blockquote> <blockquote dir="auto" class="content mb-2">{{ status.quote|safe }}</blockquote>
@ -141,6 +136,14 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if status.content_warning %}
{% trans "Hide status" as button_text %}
{% with text=button_text class="is-small" controls_text="show_status_cw" controls_uid=status.id icon_with_text="arrow-up" %}
{% include 'snippets/toggle/close_button.html' %}
{% endwith %}
{% endif %}
</div> </div>
</article> </article>
</div> </div>