notifications.html
HTML document, ASCII text
1{% extends "default.html" %} 2{% block title %} 3{% trans %}Notifications{% endtrans %} 4{% endblock %} 5{% block breadcrumbs %} 6<li><a href="/notifications">{% trans %}Notifications{% endtrans %}</a></li> 7{% endblock %} 8{% block content %} 9<x-vbox> 10<x-frame style="--width: 896px;" class="flexible-space"> 11<x-vbox> 12{% if notifications %} 13<form method="post" action="/notifications/mark-all-read"> 14<button type="submit">{% trans %}Mark all as read{% endtrans %}</button> 15</form> 16{% for notification in notifications %} 17<article class="card card-horizontal"> 18<section class="card-main flexible-space"> 19{{ notification.notification.timestamp | strftime("%A, %e %B %Y, %H:%M:%S") }} 20{% if notification.notification.data["type"] == "welcome" %} 21<h2>{% trans %}Welcome{% endtrans %}</h2> 22{% endif %} 23</section> 24<section> 25{% if notification.attention_level %} 26<button hx-post="/notifications/{{ notification.id }}/read" hx-swap="outerHTML"> 27{% trans %}Mark as read{% endtrans %} 28</button> 29{% else %} 30<button hx-post="/notifications/{{ notification.id }}/unread" hx-swap="outerHTML"> 31{% trans %}Mark as unread{% endtrans %} 32</button> 33{% endif %} 34</section> 35</article> 36{% endfor %} 37{% else %} 38<p>{% trans %}When you get notifications, they'll be shown here.{% endtrans %}</p> 39{% endif %} 40</x-vbox> 41</x-frame> 42</x-vbox> 43{% endblock %} 44