mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	More mf2 improvements for shares/reposts
This commit is contained in:
		@@ -29,8 +29,12 @@
 | 
			
		||||
    {% if outbox_object.ap_type in ["Note", "Article", "Video", "Question"] %}
 | 
			
		||||
    {{ utils.display_object(outbox_object) }}
 | 
			
		||||
    {% elif outbox_object.ap_type == "Announce" %}
 | 
			
		||||
    <div class="shared-header"><strong>{{ utils.display_tiny_actor_icon(local_actor) }} {{ local_actor.display_name | clean_html(local_actor) | safe  }}</strong> shared <span title="{{ outbox_object.ap_published_at.isoformat() }}">{{ outbox_object.ap_published_at | timeago }}</span></div>
 | 
			
		||||
    {{ utils.display_object(outbox_object.relates_to_anybox_object) }}
 | 
			
		||||
    <div class="h-entry" id="{{ outbox_object.permalink_id }}">
 | 
			
		||||
        <div class="shared-header"><strong><a class="p-author h-card" href="{{ local_actor.url }}">{{ utils.display_tiny_actor_icon(local_actor) }}  {{ local_actor.display_name | clean_html(local_actor) | safe }}</a></strong> shared <span title="{{ outbox_object.ap_published_at.isoformat() }}">{{ outbox_object.ap_published_at | timeago }}</span></div>
 | 
			
		||||
        <div class="h-cite u-repost-of">
 | 
			
		||||
            {{ utils.display_object(outbox_object.relates_to_anybox_object, is_h_entry=False) }}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% endfor %}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -247,7 +247,7 @@
 | 
			
		||||
 | 
			
		||||
{% macro display_tiny_actor_icon(actor) %}
 | 
			
		||||
{% block display_tiny_actor_icon scoped %}
 | 
			
		||||
    <img class="tiny-actor-icon" src="{{ actor.resized_icon_url }}" alt="{{ actor.display_name }}'s avatar">
 | 
			
		||||
    <img class="tiny-actor-icon" src="{{ actor.resized_icon_url }}" alt="">
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% endmacro %}
 | 
			
		||||
 | 
			
		||||
@@ -425,13 +425,13 @@
 | 
			
		||||
    {% if attachment.type == "Image" or (attachment | has_media_type("image")) %}
 | 
			
		||||
        {% if attachment.url not in object.inlined_images %}
 | 
			
		||||
        <a class="media-link" href="{{ attachment.proxied_url }}" target="_blank">
 | 
			
		||||
            <img src="{{ attachment.resized_url or attachment.proxied_url }}"{% if attachment.name %} title="{{ attachment.name }}" alt="{{ attachment.name }}"{% endif %} class="attachment">
 | 
			
		||||
            <img src="{{ attachment.resized_url or attachment.proxied_url }}"{% if attachment.name %} title="{{ attachment.name }}" alt="{{ attachment.name }}"{% endif %} class="attachment u-photo">
 | 
			
		||||
        </a>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
    {% elif attachment.type == "Video" or (attachment | has_media_type("video")) %}
 | 
			
		||||
    <video controls preload="metadata"  src="{{ attachment.url | media_proxy_url }}"{% if attachment.name %} title="{{ attachment.name }}"{% endif %}></video>
 | 
			
		||||
    <video controls preload="metadata" src="{{ attachment.url | media_proxy_url }}"{% if attachment.name %} title="{{ attachment.name }}"{% endif %} class="u-video"></video>
 | 
			
		||||
    {% elif attachment.type == "Audio" or (attachment | has_media_type("audio")) %}
 | 
			
		||||
    <audio controls preload="metadata"  src="{{ attachment.url | media_proxy_url }}"{% if attachment.name%} title="{{ attachment.name }}"{% endif %} class="attachment"></audio>
 | 
			
		||||
    <audio controls preload="metadata"  src="{{ attachment.url | media_proxy_url }}"{% if attachment.name%} title="{{ attachment.name }}"{% endif %} class="attachment u-audio"></audio>
 | 
			
		||||
    {% elif attachment.type == "Link" %}
 | 
			
		||||
    <a href="{{ attachment.url }}" class="attachment">{{ attachment.url | truncate(64, True) }}</a> ({{ attachment.mimetype}})
 | 
			
		||||
    {% else %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user