morozovka-portal/app/templates/notifications_page.html

42 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}Уведомления — Morozovka Portal{% endblock %}
{% block main_class %}container container-narrow{% endblock %}
{% block head %}
<style>
.notif-list { background: #161b22; border: 1px solid #30363d; border-radius: 6px; overflow: hidden; }
.notif-row { display: block; padding: 14px 20px; border-bottom: 1px solid #21262d; color: inherit; text-decoration: none; transition: background 0.15s; position: relative; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: #1c2128; text-decoration: none; }
.notif-row.unread { background: rgba(88,166,255,0.05); }
.notif-row.unread::before { content: ''; position: absolute; left: 8px; top: 20px; width: 6px; height: 6px; background: #58a6ff; border-radius: 50%; }
.notif-row-title { color: #e6edf3; font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.notif-row-body { color: #8b949e; font-size: 13px; line-height: 1.4; margin-bottom: 6px; }
.notif-row-time { color: #6e7681; font-size: 12px; }
.notif-row.kind-success .notif-row-title { color: #3fb950; }
.notif-row.kind-warning .notif-row-title { color: #d29922; }
.notif-row.kind-error .notif-row-title { color: #f85149; }
</style>
{% endblock %}
{% block content %}
<h1 class="page-title">Уведомления</h1>
{% if notifications %}
<div class="notif-list">
{% for n in notifications %}
<a class="notif-row kind-{{ n.kind }}{% if not n.is_read %} unread{% endif %}" href="{{ n.link_url or '#' }}">
<div class="notif-row-title">{{ n.title }}</div>
{% if n.body %}<div class="notif-row-body">{{ n.body }}</div>{% endif %}
<div class="notif-row-time">{{ n.created_at|msk_strftime('%d.%m.%Y %H:%M') }}</div>
</a>
{% endfor %}
</div>
{% else %}
<div class="empty-state">
<h3>Уведомлений пока нет</h3>
<p>Когда появятся новости — они будут здесь.</p>
</div>
{% endif %}
{% endblock %}