morozovka-portal/app/templates/notifications_page.html

72 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Уведомления — Morozovka Portal</title>
<style>
* { box-sizing: border-box; }
body { background: #0d1117; color: #e6edf3; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; font-size: 14px; line-height: 1.5; }
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.topnav { background: #161b22; border-bottom: 1px solid #30363d; padding: 12px 32px; display: flex; align-items: center; gap: 24px; }
.topnav-logo { display: flex; align-items: center; gap: 8px; color: #e6edf3; font-weight: 600; font-size: 15px; }
.topnav-logo svg { color: #58a6ff; }
.topnav-links { display: flex; gap: 20px; flex: 1; }
.topnav-links a { color: #c9d1d9; font-weight: 500; }
.topnav-links a:hover { color: #58a6ff; text-decoration: none; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 20px; border: 1px solid rgba(240,246,252,0.1); cursor: pointer; text-decoration: none; }
.btn-default { background: #21262d; color: #c9d1d9; }
.container { max-width: 900px; margin: 0 auto; padding: 24px 32px; }
h1 { font-size: 24px; font-weight: 600; margin: 0 0 24px; color: #e6edf3; }
.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; }
.empty { text-align: center; padding: 60px 20px; color: #8b949e; font-size: 14px; background: #161b22; border: 1px dashed #30363d; border-radius: 6px; }
</style>
</head>
<body>
<nav class="topnav">
<a href="/" class="topnav-logo">
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15h-2v-6h2v6zm0-8h-2V7h2v2zm4 8h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
Morozovka Platform
</a>
<div class="topnav-links">
<a href="/schedule">Расписание</a>
<a href="/projects">Проекты</a>
<a href="/workshops">Мастер-классы</a>
<a href="/files">Файлы</a>
</div>
{% if session.get('username') %}
<a href="/profile" class="btn btn-default">{{ session.get('username') }}</a>
{% endif %}
</nav>
<div class="container">
<h1>Уведомления</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">Уведомлений пока нет</div>
{% endif %}
</div>
<script src="/static/notif_bell.js"></script>
</body>
</html>