Use details and summary for announcement panel
This commit is contained in:
@ -4,29 +4,26 @@
|
||||
class="notification mb-1 p-3{% if not admin_mode %} is-hidden{% endif %} transition-y"
|
||||
{% if not admin_mode %}data-hide="hide_announcement_{{ announcement.id }}"{% endif %}
|
||||
>
|
||||
<div class="columns mb-0 is-mobile">
|
||||
<div class="column pb-0">
|
||||
<details>
|
||||
<summary>
|
||||
{% if announcement.event_date %}
|
||||
<strong>{{ announcement.event_date|naturalday|title }}:</strong>
|
||||
{% endif %}
|
||||
|
||||
{{ announcement.preview|safe }}
|
||||
</div>
|
||||
|
||||
{% if announcement.content %}
|
||||
<span class="details-close mt-4 mr-4 icon icon-x is-small" aria-hidden></span>
|
||||
{% endif %}
|
||||
</summary>
|
||||
{% if announcement.content %}
|
||||
<div class="column is-narrow pb-0">
|
||||
{% trans "Open" as button_text %}
|
||||
{% include 'snippets/toggle/open_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=uuid icon_with_text="arrow-down" %}
|
||||
{% trans "Close" as button_text %}
|
||||
{% include 'snippets/toggle/close_button.html' with text=button_text controls_text="announcement" class="is-small" controls_uid=uuid icon_with_text="arrow-up" %}
|
||||
<div class="mb-2 mt-2" id="announcement_{{ uuid }}">
|
||||
<div class="box is-shadowless mb-0">
|
||||
{{ announcement.content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if announcement.content %}
|
||||
<div class="mb-2 mt-2 {% if not pressed %}is-hidden{% endif %}" id="announcement_{{ uuid }}">
|
||||
<div class="box is-shadowless mb-0">
|
||||
{{ announcement.content|safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</details>
|
||||
<div class="is-flex mt-0 help">
|
||||
<p>{% blocktrans with user_path=announcement.user.local_path username=announcement.user.display_name %}Posted by <a href="{{ user_path }}">{{ username }}</a>{% endblocktrans %}</p>
|
||||
{% if not admin_mode %}
|
||||
|
Reference in New Issue
Block a user