{% import "macros.html" as macros %}
{# 
    thumbnail for the user - shown on the users listings
    and elsewhere
#}
<div class="user-card">
    {{ macros.gravatar(user, 64) }}
    <div class="user-info">
        {% if user.real_name %}
        <a class="name" href="{{ user.get_profile_url() }}">{{ user.real_name|escape }}</a>
        {% else %}
        <a class="name" href="{{ user.get_profile_url() }}">{{ user.username|escape }}</a>
        {% endif %}
        <br/>

        {% if badges_mode == 'public' %}
        <span class="badges" title="{{ user.get_badge_summary() }}">
            {% if user.gold %}
                <span class='badge1'>&#9679;</span><span class="badgecount">{{ user.gold }}</span>
            {% endif %}
            {% if user.silver %}
                <span class='badge2'>&#9679;</span><span class="badgecount">{{ user.silver }}</span>
            {% endif %}
            {% if user.bronze %}
                <span class='badge3'>&#9679;</span><span class="badgecount">{{ user.bronze }}</span>
            {% endif %}
        </span>
        {% endif %}
    </div>
</div>
