brutaldon-interfaccia-web-m.../brutaldon/templates/main/notifications.html

94 lines
3.7 KiB
HTML
Raw Normal View History

2018-04-26 17:17:20 +02:00
{% extends "base.html" %}
{% load humanize %}
{% block title %}
Brutaldon - {{ timeline }} timelime
{% endblock %}
{% comment %}
mastodon.notifications()[0]
# Returns the following dictionary:
{
'id': # id of the notification
'type': # "mention", "reblog", "favourite" or "follow"
'created_at': # The time the notification was created
'account': # User dict of the user from whom the notification originates
'status': # In case of "mention", the mentioning status
# In case of reblog / favourite, the reblogged / favourited status
}
{% endcomment %}
{% block content %}
<h1 class="title">Your {{ timeline }} timeline</h1>
{% for note in notes %}
{% if note.type == 'mention' %}
<div class="box" >
<p>
<strong>{{ note.account.display_name }}</strong>
(<a href="{{ note.account.url }}">{{ note.account.acct }}</a>)
mentioned you.
</p>
<br>
{% include "main/toot_partial.html" with toot=note.status reblog=False %}
</div>
2018-04-27 01:46:05 +02:00
<hr class="is-hidden">
2018-04-26 17:17:20 +02:00
{% elif note.type == 'reblog' %}
<div class="box">
<p>
{{ note.account.display_name }}
(<a href="{{ note.account.url }}">{{ note.account.acct }}</a>)
boosted your toot.
(<a href="{{ note.url }}">
2018-04-27 01:46:05 +02:00
<small>{{ note.created_at |naturaltime }}</small>
2018-04-26 17:17:20 +02:00
</a>)
</p>
{% include "main/toot_partial.html" with toot=note.status reblog=True reblog_by=note.account.acct reblog_icon=note.account.avatar %}
</div>
2018-04-27 01:46:05 +02:00
<hr class="is-hidden">
2018-04-26 17:17:20 +02:00
{% elif note.type == 'favourite' %}
<div class="box" >
<div class="level">
<div class="level-left">
<div class="level-item" >
<img class="image is-32x32 fav-avatar" src="{{ note.account.avatar }}">
</div>
<div class="level-item" >
{{ note.account.display_name }}
(<a href="{{ note.account.url }}">{{ note.account.acct }}</a>)
favorited your toot.
(<a href="{{ note.url }}">
2018-04-27 01:46:05 +02:00
<small>{{ note.created_at |naturaltime }}</small>
2018-04-26 17:17:20 +02:00
</a>)
</div>
</div>
</div>
{% include "main/toot_partial.html" with toot=note.status reblog=False %}
</div>
2018-04-27 01:46:05 +02:00
<hr class="is-hidden">
2018-04-26 17:17:20 +02:00
{% elif note.type == 'follow' %}
<div class="box" >
<article class="media">
<figure class="media-left">
<p class="image is-64x64">
<img src="{{ note.account.avatar }}" alt="">
</p>
</figure>
<div class="media-content" >
<div class="content">
<strong>{{ note.account.display_name }}</strong>
(<a href="{{ note.account.url }}">{{ note.account.acct }}</a>)
followed you.
(<a href="{{ note.url }}">
<small>{{ note.created_at |naturaltime }}</small>
</a>)
</div>
</div>
</article>
</div>
2018-04-27 01:46:05 +02:00
<hr class="is-hidden">
2018-04-26 17:17:20 +02:00
{% endif %}
{% endfor %}
{% endblock %}