pyfedi/app/templates/post/post_teaser/_poll.html
2024-12-30 13:08:40 +13:00

23 lines
1.3 KiB
HTML

<div class="col post_teaser_body">
{% if post.image_id -%}
<div class="col_thumbnail thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span></a>
{% else -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><img src="{{ post.image.thumbnail_url() }}"
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ ' blur' if blur_content }}" /></a>
{% endif -%}
</div>
{% else -%}
<div class="col_thumbnail thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None) }}"><span class="fe fe-poll"></span></a>
</div>
{% endif -%}
{% include "post/post_teaser/_title.html" %}
{% if post.body_html -%}
<div class="post_teaser_link_preview small post_teaser_clickable">
{{ first_paragraph(post.body_html) | safe }}
</div>
{% endif -%}
{% include "post/post_teaser/_utilities_bar.html" %}
</div>