Plume/templates/notifications/index.html.tera

62 lines
2.8 KiB
Plaintext
Raw Normal View History

2018-05-13 13:35:55 +00:00
{% extends "base" %}
{% 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>
<div class="list">
2018-05-13 13:35:55 +00:00
{% for notification in notifications %}
<div class="card flex">
2018-07-26 13:46:10 +00:00
{% if notification.kind == "COMMENT" %}
<i class="fa fa-comment left-icon"></i>
<main class="grow">
<h3><a href="{{ notification.object.post.url }}#comment-{{ notification.object.id }}">
{{ "{{ user }} commented your article." | _(user=notification.object.user.display_name | escape) }}
</a></h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
</main>
2018-07-26 13:46:10 +00:00
{% elif notification.kind == "FOLLOW" %}
<i class="fa fa-user-plus left-icon"></i>
<main class="grow">
<h3><a href="/@/{{ notification.object.follower.fqn }}/">
{{ "{{ user }} is now following you." | _(user=notification.object.follower.display_name | escape) }}
</a></h3>
</main>
2018-07-26 13:46:10 +00:00
{% elif notification.kind == "LIKE" %}
<i class="fa fa-heart left-icon"></i>
<main class="grow">
<h3>
{{ "{{ user }} liked your article." | _(user=notification.object.user.display_name | escape) }}
</h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
</main>
2018-07-26 13:46:10 +00:00
{% elif notification.kind == "MENTION" %}
<i class="fa fa-at left-icon"></i>
<main class="grow">
<h3><a href="{{ notification.object.url }}">
{{ "{{ user }} mentioned you." | _(user=notification.object.user.display_name | escape) }}
</a></h3>
</main>
2018-07-26 13:46:10 +00:00
{% elif notification.kind == "RESHARE" %}
<i class="fa fa-retweet left-icon"></i>
<main class="grow">
<h3>
{{ "{{ user }} reshared your article." | _(user=notification.object.user.display_name | escape) }}
</h3>
<p><a href="{{ notification.object.post.url }}">{{ notification.object.post.post.title }}</a></p>
</main>
2018-07-26 13:46:10 +00:00
2018-05-13 13:35:55 +00:00
{% endif %}
</div>
{% endfor %}
</div>
{{ macros::paginate(page=page, total=n_pages) }}
2018-05-13 13:35:55 +00:00
{% endblock content %}