pyfedi/app/templates/post/post_teaser/_utilities_bar.html

37 lines
2.2 KiB
HTML

<div class="post_utilities_bar">
<div class="post_replies_link">
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None, _anchor='post_replies') }}" aria-label="{{ _('View comments') }}"><span class="fe fe-reply"></span> <span aria-label="{{ _('Number of comments:') }}">{{ post.reply_count }}</span></a>
</div>
<div class="voting_buttons_new" aria-live="assertive">
{% include "post/_post_voting_buttons.html" -%}
</div>
{% if post.type == POST_TYPE_IMAGE and low_bandwidth -%}
<div class="preview_image">
{% if post.image_id -%}
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" aria-label="{{ _('View image') }}" aria-hidden="true"><span class="fe fe-magnify"></span></a>
{% else -%}
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}" aria-hidden="true"><span class="fe fe-magnify"></span></a>
{% endif -%}
</div>
{% endif -%}
{% if current_user.is_authenticated and post.type == POST_TYPE_LINK and post.author.bot and (post.cross_posts is none or len(post.cross_posts) == 0) -%}
<div class="post_cross_post_link">
<a rel="nofollow" aria-label="{{ _('Cross-post') }}" href="{{ url_for('post.post_cross_post', post_id=post.id) }}"><span class="fe fe-cross-post"></span></a>
</div>
{% endif -%}
<div class="post_options_link">
<div class="dropdown">
<a href="{{ url_for('post.post_options', post_id=post.id) if low_bandwidth else '#' }}"
data-bs-toggle="dropdown"
rel="nofollow noindex"><span class="fe fe-options" title="Options"></span></a>
<ul class="dropdown-menu" style="width: 320px">
<div
hx-get="{{ url_for('post.post_options', post_id=post.id) }}"
hx-trigger="revealed"
hx-target="this"
hx-swap="outerHTML"
></div>
</ul>
</div>
</div>
</div>