Add icons to notifications

And some space between each of them

Fix #139
This commit is contained in:
Bat
2018-07-26 16:09:36 +02:00
parent c87d490664
commit 7a6c01fec5
7 changed files with 131 additions and 22 deletions
+34 -19
View File
@@ -9,34 +9,49 @@
<h1>{{ "Notifications" | _ }}</h1>
<div class="list">
{% for notification in notifications %}
<div class="card">
<div class="card flex">
{% 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>
<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>
{% elif notification.kind == "FOLLOW" %}
<h3><a href="/@/{{ notification.object.follower.fqn }}/">
{{ "{{ user }} is now following you." | _(user=notification.object.follower.display_name) }}
</a></h3>
<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>
{% 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>
<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>
{% elif notification.kind == "MENTION" %}
<h3><a href="{{ notification.object.url }}">
{{ "{{ user }} mentioned you." | _(user=notification.object.user.display_name) }}
</a></h3>
<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>
{% 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>
<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>
{% endif %}
</div>