{% from 'macros.twig' import avatar %} {% from '_layout/input.twig' import input_checkbox_raw %}
{% if profile_is_editing and perms.edit_avatar %}
{{ input_checkbox_raw('avatar[delete]', false, 'profile__header__avatar__check', '', false, {'id':'avatar-delete'}) }}
{% else %}
{{ avatar(profile_user.user_id|default(0), 120, profile_user.username|default('')) }}
{% endif %}
{% if profile_user is defined %}
{{ profile_user.username }}
{% if profile_user.user_title is not empty %}
{{ profile_user.user_title }}
{% endif %}
{{ profile_user.countryName }}{% if profile_user.user_age > 0 %}, {{ profile_user.user_age }} year{{ profile_user.user_age != 's' ? 's' : '' }} old{% endif %}
{% else %}
User not found!
Check the link and try again.
{% endif %}
{% if profile_viewer is not null and profile_user.id != profile_viewer.id and profile_user.relationString(profile_viewer) != 'none' %}
{% if profile_user.relationString(profile_viewer) == 'mutual' %} Mutual Friends {% elseif profile_user.relationString(profile_viewer) == 'followed' %} You Follow {% elseif profile_user.relationString(profile_viewer) == 'following' %} Follows You {% endif %}
{% endif %}
{% if profile_user is defined %}
{% if profile_mode is empty %} {% if profile_is_editing %} Discard Settings {% elseif profile_can_edit %} Edit Profile {% endif %} {% if current_user is defined and current_user.user_id != profile_user.user_id and not profile_is_editing %} {% if profile_user.relationString(profile_viewer) != 'following' %} Unfollow {% else %} Follow {% endif %} {% endif %} {% else %} Return {% endif %}
{% endif %} {% if stats is defined %}
{% for stat in stats %} {% if stat.value|default(false) %} {% set is_date = stat.is_date|default(false) %} {% set is_url = stat.url is defined %} {% set active_class = stat.active|default(false) ? ' profile__header__stat--active' : '' %} {% if is_url %} {% else %} {% endif %} {% endif %} {% endfor %}
{% endif %}