bridgy-fed/templates/_followers.html

35 wiersze
1.1 KiB
HTML

<div class="row">
<ul class="user-items">
{% for f in followers %}
<li class="row">
{% with url=f.user.web_url(), user_as1=f.user.obj.as1 or {} %}
<a class="follower col-xs-10 col-sm-10 col-lg-6" href="{{ url }}">
{% with picture=util.get_url(user_as1, 'icon') or util.get_url(user_as1, 'image') %}
{% if picture %}
<img class="profile u-photo" src="{{ picture }}" width="48px">
{% endif %}
{% endwith %}
{{ user_as1.get('displayName') or '' }}
<!-- TODO: genericize -->
{{ as2.address(ActivityPub.convert(f.user.obj, from_user=user) or url) or url }}
</a>
{% endwith %}
{% if page_name == 'following' %}
<form method="post" action="/unfollow/start" class="col-xs-2 col-sm-1 col-lg-1">
<input type="hidden" name="me" value="{{ user.web_url() }}/" />
<input type="hidden" name="key" value="{{ f.key.id() }}" />
<input type="submit" title="Unfollow (requires IndieAuth)" value="✖"
class="btn delete-website" />
</form>
{% endif %}
</li>
{% else %}
<span class="big">No one yet. Check back soon!</span>
{% endfor %}
</ul>
{% include "paging.html" %}