microblog.pub/templates/stream.html

73 lines
2.7 KiB
HTML
Raw Normal View History

2018-05-18 13:41:41 -05:00
{% extends "layout.html" %}
{% import 'utils.html' as utils %}
2018-07-20 03:56:39 -05:00
{% block title %}{% if request.path == url_for('admin_stream') %}Stream{% else %}Notifications{% endif %} - {{ config.NAME }}{% endblock %}
2018-05-18 13:41:41 -05:00
{% block content %}
<div class="h-feed" id="container">
{% include "header.html" %}
<div id="admin">
<div id="notes">
{% for item in inbox_data %}
{% if 'actor' in item.meta %}
2018-06-29 15:16:26 -05:00
{% if item | has_type('Create') %}
2018-07-07 05:10:25 -05:00
{{ utils.display_note(item.activity.object, ui=True, meta=item.meta) }}
2018-05-18 13:41:41 -05:00
{% else %}
2018-06-29 15:16:26 -05:00
{% if item | has_type('Announce') %}
2018-07-20 03:56:39 -05:00
{% set boost_actor = item.meta.actor %}
2018-08-28 15:14:48 -05:00
{% if boost_actor %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name or boost_actor.preferredUsername }}</a> boosted</span></p>
2018-08-28 15:14:48 -05:00
{% endif %}
2018-06-29 15:16:26 -05:00
{% if item.meta.object %}
2019-07-15 16:08:12 -05:00
{{ utils.display_note(item.meta.object, ui=True, meta=item.meta) }}
2018-05-18 13:41:41 -05:00
{% endif %}
{% endif %}
2018-07-30 11:12:27 -05:00
{% if item | has_type('Like') %}
{% set boost_actor = item.meta.actor %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name or boost_actor.preferredUsername }}</a> liked</span></p>
2018-07-30 11:12:27 -05:00
{% if item.meta.object %}
2019-07-15 16:08:12 -05:00
{{ utils.display_note(item.meta.object, ui=False, meta=item.meta) }}
2018-07-30 11:12:27 -05:00
{% endif %}
{% endif %}
2018-05-18 13:41:41 -05:00
2018-06-29 15:16:26 -05:00
{% if item | has_type('Follow') %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover">new follower</span> <!-- <a href="" class="bar-item">follow back</a></p> -->
2018-06-29 15:16:26 -05:00
<div style="height: 100px;">
2018-07-20 03:56:39 -05:00
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
2018-06-29 15:16:26 -05:00
</div>
{% elif item | has_type('Accept') %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover">you started following</span></p>
2018-07-01 14:32:12 -05:00
<div style="height: 100px;">
2018-07-20 03:56:39 -05:00
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
2018-07-01 14:32:12 -05:00
</div>
{% elif item | has_type('Undo') %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover">unfollowed you</span></p>
2018-06-29 15:16:26 -05:00
<div style="height: 100px;">
2018-07-20 03:56:39 -05:00
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
2018-06-29 15:16:26 -05:00
</div>
2018-05-18 13:41:41 -05:00
{% else %}
2018-06-29 15:16:26 -05:00
2018-05-18 13:41:41 -05:00
{% endif %}
{% endif %}
2019-07-04 16:22:38 -05:00
{% else %}
{% if item | has_type('question_ended') %}
2019-07-05 15:05:28 -05:00
<p style="margin-left:70px;padding-bottom:5px;display:inline-block;"><span class="bar-item-no-hover">poll ended</span></p>
2019-07-15 16:08:12 -05:00
{{ utils.display_note(item.activity, meta={"object_visibility": "PUBLIC"}) }}
2019-07-04 16:22:38 -05:00
{% endif %}
2018-05-18 13:41:41 -05:00
{% endif %}
{% endfor %}
2018-07-06 16:53:33 -05:00
{{ utils.display_pagination(older_than, newer_than) }}
2018-05-18 13:41:41 -05:00
</div>
</div>
</div>
{% endblock %}