File size: 1,386 Bytes
aec61e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends "base.html" %}
{% block content %}
<section class="notifications-page" data-notification-center data-csrf="{{ csrf }}">
  <header class="page-heading-row">
    <div>
      <p class="eyebrow">Your activity</p>
      <h1>Notifications</h1>
      <p><span data-page-unread>{{ unread_count }}</span> unread</p>
    </div>
    <button class="secondary read-all" type="button" {% if unread_count == 0 %}disabled{% endif %}>Mark all as read</button>
  </header>
  <div class="notification-list" aria-live="polite">
    {% if notifications %}
      {% for notification in notifications %}
        <article class="notification-card{% if not notification.read_at %} unread{% endif %}" data-notification-id="{{ notification.id }}">
          <div>
            <p class="notification-category">{{ notification.category | replace('_', ' ') }}</p>
            <h2>{{ notification.title }}</h2>
            <p>{{ notification.body }}</p>
          </div>
          {% if not notification.read_at %}<button class="text-link mark-read" type="button">Mark as read</button>{% endif %}
        </article>
      {% endfor %}
    {% else %}
      <div class="empty-state"><h2>You're all caught up</h2><p>Updates from campaigns and causes you follow will appear here.</p></div>
    {% endif %}
  </div>
  <a href="/settings/notifications">Manage notification settings</a>
</section>
{% endblock %}