{% load evelinks %}
{% load aa_forum %}

<div class="aa-forum-message-author m-md-3">
    <figure>
        {% with user_maincharacter_id=message_author|aa_forum_main_character_id %}
            <img
                class="aa-forum-character-portrait img rounded img-author-avatar"
                src="{{ user_maincharacter_id|character_portrait_url:128 }}"
                alt="{{ message_author|aa_forum_main_character_name }}"
                width="128"
                height="128"
                loading="lazy"
            >
        {% endwith %}
    </figure>

    <p>
        <span><b>{{ message_author|aa_forum_main_character_name }}</b><br></span>
        <span class="hidden-xs">{{ message_author|aa_forum_main_character_corporation_name }}</span>

        {% with main_character_alliance_name=message_author|aa_forum_main_character_alliance_name %}
            {% if main_character_alliance_name %}
                <span class="hidden-xs"><br><em>{{ main_character_alliance_name }}</em></span>
            {% endif %}
        {% endwith %}
    </p>

    {% if message_author.aa_forum_user_profile %}
        {% if message_author.aa_forum_user_profile.website_title and message_author.aa_forum_user_profile.website_url %}
            <p class="small hidden-xs">
                <a href="{{ message_author.aa_forum_user_profile.website_url }}" target="_blank" rel="noreferrer noopener">
                    {{ message_author.aa_forum_user_profile.website_title }}
                </a>
            </p>
        {% endif %}
    {% endif %}
</div>
