{%- include 'admin/shadowbanned_tooltip.html' -%}
{% macro username_display(user, name=None, distinguish=0, display_class="") %}
	{% set display_name = user.username %}
	{% set display_color_fg = "ffffff" if user.patron else user.name_color %}
	{% set display_color_bg = user.name_color if (user.patron and not distinguish) else None %}
	{% set display_class = "mod" if distinguish else ("rounded-bg" if user.patron else "") %}
	<span class="font-weight-bold {{display_class}}" style="color: #{{display_color_fg}};{% if display_color_bg %} background-color:#{{display_color_bg}};{% endif %}">{{display_name}}</span>
{% endmacro %}

{% if user %}
<a data-sort-key="{{user.username.lower()}}" href="/@{{user.username}}">
	<span class="profile-pic-20-wrapper">
		<img loading="lazy" src="{{user.profile_url}}" class="pp20">
    </span>
	{{username_display(user)}}
</a>
{% endif %}
