lib.itmens/users/templates/users/announcements.html
2024-04-17 00:04:49 -04:00

58 lines
1.5 KiB
HTML

{% load static %}
{% load i18n %}
{% load humanize %}
<!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 '公告栏' %}</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 '公告栏' %}
{% 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|naturaltime }}</a></span>
</span>
</footer>
</article>
{% empty %}
<p>{% trans '暂无公告' %}</p>
{% endfor %}
</main>
{% include "_footer.html" %}
</body>
</html>