Plume/templates/notifications/index.html.tera

47 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-05-13 15:35:55 +02:00
{% extends "base" %}
{% import "macros" as macros %}
2018-05-13 15:35:55 +02:00
{% block title %}
2018-06-17 17:26:15 +02:00
{{ "Notifications" | _ }}
2018-05-13 15:35:55 +02:00
{% endblock title %}
{% block content %}
2018-06-17 17:26:15 +02:00
<h1>{{ "Notifications" | _ }}</h1>
<div class="list">
2018-05-13 15:35:55 +02:00
{% for notification in notifications %}
<div class="card">
2018-07-26 15:46:10 +02:00
{% if notification.kind == "COMMENT" %}
<h3><a href="{{ notification.object.post.url }}#comment-{{ notification.object.id }}">
{{ "{{ user }} commented your article." | _(user=notification.object.user.display_name) }}
</a></h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.title }}</a></p>
{% elif notification.kind == "FOLLOW" %}
<h3><a href="/@/{{ notification.object.follower.fqn }}/">
{{ "{{ user }} is now following you." | _(user=notification.object.follower.display_name) }}
</a></h3>
{% elif notification.kind == "LIKE" %}
<h3>
{{ "{{ user }} liked your article." | _(user=notification.object.user.display_name) }}
</h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.title }}</a></p>
{% elif notification.kind == "MENTION" %}
<h3><a href="{{ notification.object.url }}">
{{ "{{ user }} mentioned you." | _(user=notification.object.user.display_name) }}
</a></h3>
{% elif notification.kind == "RESHARE" %}
<h3>
{{ "{{ user }} reshare your article." | _(user=notification.object.user.display_name) }}
</h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.title }}</a></p>
2018-05-13 15:35:55 +02:00
{% endif %}
</div>
{% endfor %}
</div>
{{ macros::paginate(page=page, total=n_pages) }}
2018-05-13 15:35:55 +02:00
{% endblock content %}