microblog.pub/templates/stream.html
Thomas Sileo 1a7a02a221
Bugfixes by @cwt (#42)
* check for missing actor in stream item

* reply on my own status

* fix img exceed div

* check for "actor" key in item.meta before render

* force UTF-8 text encoding

* check if a is a dict or string

* check d object must be dict to get url or id

* json/atom/rss feed

* handle missing root_id

* fix newer-link hover

* fix older-link position

* quick hack to support peertube video

* enable IndieAuth endpoint

* fix 500 when remote follow
2019-02-24 21:04:09 +01:00

67 lines
2.3 KiB
HTML

{% extends "layout.html" %}
{% import 'utils.html' as utils %}
{% block title %}{% if request.path == url_for('admin_stream') %}Stream{% else %}Notifications{% endif %} - {{ config.NAME }}{% endblock %}
{% 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 %}
{% if item | has_type('Create') %}
{{ utils.display_note(item.activity.object, ui=True, meta=item.meta) }}
{% else %}
{% if item | has_type('Announce') %}
{% set boost_actor = item.meta.actor %}
{% if boost_actor %}
<p style="margin-left:70px;padding-bottom:5px;"><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>
{% endif %}
{% if item.meta.object %}
{{ utils.display_note(item.meta.object, ui=True) }}
{% endif %}
{% endif %}
{% if item | has_type('Like') %}
{% set boost_actor = item.meta.actor %}
<p style="margin-left:70px;padding-bottom:5px;"><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>
{% if item.meta.object %}
{{ utils.display_note(item.meta.object, ui=False, meta={'actor': item.meta.object_actor}) }}
{% endif %}
{% endif %}
{% if item | has_type('Follow') %}
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">new follower</span> <!-- <a href="" class="bar-item">follow back</a></p> -->
<div style="height: 100px;">
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
</div>
{% elif item | has_type('Accept') %}
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">you started following</span></p>
<div style="height: 100px;">
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
</div>
{% elif item | has_type('Undo') %}
<p style="margin-left:70px;padding-bottom:5px;"><span class="bar-item-no-hover">unfollowed you</span></p>
<div style="height: 100px;">
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
</div>
{% else %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{{ utils.display_pagination(older_than, newer_than) }}
</div>
</div>
</div>
{% endblock %}