Template tweak/fixes

This commit is contained in:
Thomas Sileo 2019-09-05 23:16:23 +02:00
parent b6e55dd647
commit 0b34913c6e
2 changed files with 18 additions and 2 deletions

View file

@ -27,7 +27,7 @@
{% if following %}
<form action="/api/undo" class="action-form" method="post">
<input type="hidden" name="redirect" value="{{ actor_redir }}"/>
<input type="hidden" name="id" value="{{ following.id }}"/>
<input type="hidden" name="id" value="{{ following.remote_id }}"/>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button type="submit" class="bar-item">unfollow</button>
</form>
@ -163,6 +163,7 @@
<span class="bar-item-no-hover">new follower</span>
{% if item.meta.notification_unread %}<span class="bar-item-no-bg"><span class="pcolor">new</span></span>{% endif %}
<span class="bar-item-no-bg">{{ (item.activity.published or item.meta.published) | format_timeago }}</span>
<a class="bar-item" href="/admin/profile?actor_id={{item.meta.actor_id}}">profile</a>
{% if item.meta.notification_follows_back %}<span class="bar-item-no-hover">already following</span>
{% else %}
<form action="/api/follow" class="action-form" method="POST">
@ -182,9 +183,23 @@
<span class="bar-item-no-hover">you started following</span>
{% if item.meta.notification_unread %}<span class="bar-item-no-bg"><span class="pcolor">new</span></span>{% endif %}
<span class="bar-item-no-bg">{{ (item.activity.published or item.meta.published) | format_timeago }}</span>
<a class="bar-item" href="/admin/profile?actor_id={{item.meta.actor_id}}">profile</a>
{% if item.meta.notification_follows_back %}<span class="bar-item-no-hover">follows you back</span>{% endif %}
</div>
<div style="height: 100px;">
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
</div>
{% elif item | has_type('Reject') %}
<div style="margin-left:70px;padding-bottom:5px;margin-bottom:15px;display:inline-block;">
<span class="bar-item-no-hover">rejected your follow request</span>
{% if item.meta.notification_unread %}<span class="bar-item-no-bg"><span class="pcolor">new</span></span>{% endif %}
<span class="bar-item-no-bg">{{ (item.activity.published or item.meta.published) | format_timeago }}</span>
<a class="bar-item" href="/admin/profile?actor_id={{item.meta.actor_id}}">profile</a>
{% if item.meta.notification_follows_back %}<span class="bar-item-no-hover">follows you</span>{% endif %}
</div>
<div style="height: 100px;">
{{ utils.display_actor_inline(item.meta.actor, size=50) }}
</div>

View file

@ -204,7 +204,8 @@ self reply
{% endif %}
{% for a in obj.attachment %}
{% if (a.mediaType and a.mediaType.startswith("image/")) or (a.type and a.type == 'Image') %}
<a href="{{ a.url | get_attachment_url(None) }}"><img src="{{a.url | get_attachment_url(720) }}" class="img-attachment"></a>
<a href="{{ a.url | get_attachment_url(None) }}">
<img src="{{a.url | get_attachment_url(720) }}" title="{{ a.name }}" class="img-attachment"></a>
{% elif (a.mediaType and a.mediaType.startswith("video/")) %}
<li><video controls preload="metadata" src="{{ a.url | get_attachment_url(None) }}" width="480"></video></li>
{% elif (a.mediaType and a.mediaType.startswith("audio/")) %}