2018-05-13 13:35:55 +00:00
|
|
|
{% extends "base" %}
|
2018-07-25 13:33:54 +00:00
|
|
|
{% import "macros" as macros %}
|
2018-05-13 13:35:55 +00:00
|
|
|
|
|
|
|
{% block title %}
|
2018-06-17 15:26:15 +00:00
|
|
|
{{ "Notifications" | _ }}
|
2018-05-13 13:35:55 +00:00
|
|
|
{% endblock title %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-06-17 15:26:15 +00:00
|
|
|
<h1>{{ "Notifications" | _ }}</h1>
|
2018-05-13 20:33:21 +00:00
|
|
|
<div class="list">
|
2018-05-13 13:35:55 +00:00
|
|
|
{% for notification in notifications %}
|
2018-07-26 14:09:36 +00:00
|
|
|
<div class="card flex">
|
2018-07-26 13:46:10 +00:00
|
|
|
{% if notification.kind == "COMMENT" %}
|
2018-09-05 15:56:23 +00:00
|
|
|
<i class="icon icon-message-circle left-icon"></i>
|
2018-07-26 14:09:36 +00:00
|
|
|
<main class="grow">
|
|
|
|
<h3><a href="{{ notification.object.post.url }}#comment-{{ notification.object.id }}">
|
2018-07-26 14:36:19 +00:00
|
|
|
{{ "{{ user }} commented your article." | _(user=notification.object.user.name | escape) }}
|
2018-07-26 14:09:36 +00:00
|
|
|
</a></h3>
|
|
|
|
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
|
|
|
|
</main>
|
2018-08-18 10:55:34 +00:00
|
|
|
<p><small>{{ notification.creation_date | date(format="%B %e, %H:%M") }}</small></p>
|
2018-07-26 13:46:10 +00:00
|
|
|
|
|
|
|
{% elif notification.kind == "FOLLOW" %}
|
2018-09-05 15:56:23 +00:00
|
|
|
<i class="icon icon-user-plus left-icon"></i>
|
2018-07-26 14:09:36 +00:00
|
|
|
<main class="grow">
|
|
|
|
<h3><a href="/@/{{ notification.object.follower.fqn }}/">
|
2018-07-26 14:36:19 +00:00
|
|
|
{{ "{{ user }} is now following you." | _(user=notification.object.follower.name | escape) }}
|
2018-07-26 14:09:36 +00:00
|
|
|
</a></h3>
|
|
|
|
</main>
|
2018-08-18 10:55:34 +00:00
|
|
|
<p><small>{{ notification.creation_date | date(format="%B %e, %H:%M") }}</small></p>
|
2018-07-26 13:46:10 +00:00
|
|
|
|
|
|
|
{% elif notification.kind == "LIKE" %}
|
2018-09-05 15:56:23 +00:00
|
|
|
<i class="icon icon-heart left-icon"></i>
|
2018-07-26 14:09:36 +00:00
|
|
|
<main class="grow">
|
|
|
|
<h3>
|
2018-07-26 14:36:19 +00:00
|
|
|
{{ "{{ user }} liked your article." | _(user=notification.object.user.name | escape) }}
|
2018-07-26 14:09:36 +00:00
|
|
|
</h3>
|
|
|
|
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
|
|
|
|
</main>
|
2018-08-18 10:55:34 +00:00
|
|
|
<p><small>{{ notification.creation_date | date(format="%B %e, %H:%M") }}</small></p>
|
2018-07-26 13:46:10 +00:00
|
|
|
|
|
|
|
{% elif notification.kind == "MENTION" %}
|
2018-09-05 15:56:23 +00:00
|
|
|
<i class="icon icon-at-sign left-icon"></i>
|
2018-07-26 14:09:36 +00:00
|
|
|
<main class="grow">
|
|
|
|
<h3><a href="{{ notification.object.url }}">
|
2018-07-26 14:36:19 +00:00
|
|
|
{{ "{{ user }} mentioned you." | _(user=notification.object.user.name | escape) }}
|
2018-07-26 14:09:36 +00:00
|
|
|
</a></h3>
|
|
|
|
</main>
|
2018-08-18 10:55:34 +00:00
|
|
|
<p><small>{{ notification.creation_date | date(format="%B %e, %H:%M") }}</small></p>
|
2018-07-26 13:46:10 +00:00
|
|
|
|
|
|
|
{% elif notification.kind == "RESHARE" %}
|
2018-09-05 15:56:23 +00:00
|
|
|
<i class="icon icon-repeat left-icon"></i>
|
2018-07-26 14:09:36 +00:00
|
|
|
<main class="grow">
|
|
|
|
<h3>
|
2018-08-18 22:52:28 +00:00
|
|
|
{{ "{{ user }} boosted your article." | _(user=notification.object.user.name | escape) }}
|
2018-07-26 14:09:36 +00:00
|
|
|
</h3>
|
|
|
|
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
|
|
|
|
</main>
|
2018-08-18 10:55:34 +00:00
|
|
|
<p><small>{{ notification.creation_date | date(format="%B %e, %H:%M") }}</small></p>
|
2018-07-26 13:46:10 +00:00
|
|
|
|
2018-05-13 13:35:55 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2018-07-25 13:33:54 +00:00
|
|
|
{{ macros::paginate(page=page, total=n_pages) }}
|
2018-05-13 13:35:55 +00:00
|
|
|
{% endblock content %}
|