add collapsed option to username rendering, remove redundant link, don't show own reputation

This commit is contained in:
Hendrik L 2024-07-04 14:00:42 +02:00
parent bfdb8749e5
commit 0ff7a27c90

View file

@ -3,22 +3,25 @@
{% if user.deleted -%}
[deleted]
{% else -%}
{% if user.avatar_id and not low_bandwidth -%}
<a href="/u/{{ user.link() }}" title="{{ user.ap_id if user.ap_id != none else user.user_name }}">
<img src="{{ user.avatar_thumbnail() }}" alt="" loading="lazy" /></a>
{% endif -%}
<a href="/u/{{ user.link() }}" title="{{ user.ap_id if user.ap_id != none else user.user_name }}">{{ user.display_name() }}</a>
<a href="/u/{{ user.link() }}" title="{{ user.ap_id if user.ap_id != none else user.user_name }}" aria-label="{{ _('Author') }}">
{% if user.avatar_id and not low_bandwidth and not collapsed -%}
<img src="{{ user.avatar_thumbnail() }}" alt="" loading="lazy" />
{% endif -%}
{{ user.display_name() }}
</a>
{% if user.created_recently() -%}
<span class="fe fe-new-account" title="New account"> </span>
{% endif -%}
{% if user.bot -%}
<span class="fe fe-bot-account" title="Bot account"> </span>
{% endif -%}
{% if user.reputation < -10 -%}
<span class="fe fe-warning red" title="Very low reputation. Beware."> </span>
<span class="fe fe-warning red" title="Very low reputation. Beware!"> </span>
{% elif user.reputation < 0 -%}
<span class="fe fe-warning orangered" title="Low reputation."> </span>
{% if user.id != current_user.id -%}
{% if user.reputation < -10 -%}
<span class="fe fe-warning red" title="Very low reputation. Beware."> </span>
<span class="fe fe-warning red" title="Very low reputation. Beware!"> </span>
{% elif user.reputation < 0 -%}
<span class="fe fe-warning orangered" title="Low reputation."> </span>
{% endif -%}
{% endif -%}
{% endif -%}
</span>