{% load static %}
{% load i18n %}
{% load humanize %}
{% load duration %}
<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {% include "common_libs.html" %}
    <title>{{ site_name }} - {% trans 'Announcements' %}</title>
  </head>
  <body>
    {% include "_header.html" %}
    <style>
        .markdownx-preview {
            min-height: 40px;
        }
        h4 {
            display: inline-block;
        }
        .operations {
            margin-left: 5px;
        }
        .datetime {
            margin-left: 12px;
            color: #ccc;
        }
        .header {
            display: inline-block;
        }
        .add {
            margin-left: 15px;
        }
        .dividing-line {
            border-top-style: dashed;
        }
    </style>
    <main class="container">
      <h1 class="header">
        {% trans 'Announcements' %}
        {% if request.user.is_superuser %}🦹🏻{% endif %}
        {% if request.user.is_staff %}🧙🏻{% endif %}
      </h1>
      {% for announcement in announcements %}
        <article>
          {{ announcement.html | safe }}
          <footer>
            <span class="action inline"><span><a>{{ announcement.created|default:announcement.created|date }}</a></span>
          </span>
        </footer>
      </article>
    {% empty %}
      <p>{% trans 'nothing so far.' %}</p>
    {% endfor %}
  </main>
  {% include "_footer.html" %}
</body>
</html>
