{% 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.id|default(0), 120, profile_user.username|default('')) }}
{% endif %}
{% if profile_user is defined %}
{{ profile_user.username }}
{% if profile_user.hasTitle %}
{{ profile_user.title }}
{% endif %}
{{ profile_user.countryName }}{% if profile_user.hasAge %},{% set age = profile_user.age %} {{ age }} year{{ age != 's' ? 's' : '' }} old{% endif %}
{% else %}
User not found!
Check the link and try again.
{% endif %}
{% if profile_user is defined %}
{% if profile_mode is empty %} {% if profile_is_editing %} Discard Settings {% elseif profile_can_edit %} Edit Profile {% endif %} {% else %} Return {% endif %}
{% endif %} {% if stats is defined %}
{% for stat in stats %} {% if stat.value|default(0) > 0 %} {% 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 %}