mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
157486d7b2
I have a much easier time recognizing icons, even if they're small compared to reading the name of the community. I thought for example that beehive blocked me because I never saw any posts from there. Turns out I see all of them, I just didn't realize that those posts were from beehive, because we don't show the domain part of a community, so I assumed every time I saw c/technology it came from lemme world. With the icon I can see imediatelly that it's from beehive. It does make the page a bit heavier because the browser needs to download all the community icons, but in my opinion it is worth it for the better UX.
32 lines
2.3 KiB
HTML
32 lines
2.3 KiB
HTML
<div class="col post_teaser_body">
|
|
<h3>{% if post.sticky -%}<span class="fe fe-sticky-left"></span>{% endif -%}<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None) }}" class="post_teaser_title_a">{{ post.title }}</a>
|
|
{% if post.nsfw -%}<span class="warning_badge nsfw" title="{{ _('Not safe for work') }}">nsfw</span>{% endif -%}
|
|
{% if post.nsfl -%}<span class="warning_badge nsfl" title="{{ _('Potentially emotionally scarring content') }}">nsfl</span>{% endif -%}
|
|
{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%}
|
|
<span class="red fe fe-report" title="{{ _('Reported. Check post for issues.') }}"></span>
|
|
{% endif -%}
|
|
{% if post.sticky -%}<span class="fe fe-sticky-right"></span>{% endif -%}
|
|
</h3>
|
|
<span class="author small">{% if show_post_community -%}<a href="/c/{{ post.community.link() }}" aria-label="{{ _('Go to community %(name)s', name=post.community.name) }}">
|
|
{% if post.community.icon_image() %}<img class="community_icon_small rounded-circle" src="{{ post.community.icon_image() }}" alt="Community icon" />{% endif -%}
|
|
c/{{ post.community.name }}</a>{% endif -%}
|
|
by {{ render_username(post.author) }} <time datetime="{{ post.last_active }}">{{ post.posted_at_localized(sort, locale) }}</time></span>
|
|
{% if post.body_html -%}
|
|
<div class="post_teaser_article_preview small">
|
|
{{ first_paragraph(post.body_html) | safe }}
|
|
</div>
|
|
{% endif -%}
|
|
{% include "post/post_teaser/_utilities_bar.html" %}
|
|
</div>
|
|
{% if post.image_id -%}
|
|
<div class="col col-2 col_thumbnail">
|
|
<div class="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>
|
|
</div>
|
|
{% endif -%}
|