Eliseu Amaro
600a1511cb
In user panel render time reduced dramatically, by ~70ms. Said icon was requested by twig >10 times.
73 lines
3.5 KiB
Twig
73 lines
3.5 KiB
Twig
{% set actor_nickname = actor.getNickname() %}
|
|
{% set actor_avatar = actor.getAvatarUrl() %}
|
|
{% set actor_avatar_dimensions = actor.getAvatarDimensions() %}
|
|
{% set actor_tags = actor.getSelfTags() %}
|
|
{% set actor_has_bio = actor.hasBio() %}
|
|
{% set actor_uri = actor.getUri() %}
|
|
{% set actor_url = actor.getUrl() %}
|
|
{% set actor_is_local = actor.getIsLocal() %}
|
|
{% set mention = mention(actor) %}
|
|
|
|
{% block profile_view %}
|
|
<section id='profile-{{ actor.id }}' class='profile'
|
|
title="{% trans %} %actor_nickname%'s profile information{% endtrans %}">
|
|
<header>
|
|
<div class="profile-info">
|
|
<img src="{{ actor_avatar }}" class="profile-avatar avatar"
|
|
alt="{% trans %} %actor_nickname%'s avatar{% endtrans %}"
|
|
title="{% trans %} %actor_nickname%'s avatar{% endtrans %}"
|
|
width="{{ actor_avatar_dimensions['width'] }}"
|
|
height="{{ actor_avatar_dimensions['height'] }}">
|
|
<div>
|
|
<a class="profile-info-url" href="{{ actor_uri }}">
|
|
<strong class="profile-info-url-nickname"
|
|
title="{% trans %} %actor_nickname%'s nickname {% endtrans %}">
|
|
{{ actor_nickname }}
|
|
</strong>
|
|
{% if not actor_is_local %}
|
|
<span class="profile-info-url-remote">
|
|
{{ mention }}
|
|
</span>
|
|
{% endif %}
|
|
</a>
|
|
<ul class="profile-info-actions">
|
|
{% for current_action in get_profile_actions(actor) %}
|
|
<li>
|
|
<a title="{{ current_action["title"] | trans }}"
|
|
class="{{ current_action["classes"] }}"
|
|
href="{{ current_action["url"] }}"></a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="profile-stats">
|
|
<span class="profile-stats-subscriptions" title="{% trans %} %actor_nickname%'s subscribed count{% endtrans %}">
|
|
<strong>
|
|
<a href="{{ actor.getSubscriptionsUrl() }}">{{ 'Subscribed' | trans }}</a>
|
|
</strong>{{ actor.getSubscribedCount() }}
|
|
</span>
|
|
<span class="profile-stats-subscribers" title="{% trans %} %actor_nickname%'s subscribers count{% endtrans %}">
|
|
<strong>
|
|
<a href="{{ actor.getSubscribersUrl() }}">{{ 'Subscribers' | trans }}</a>
|
|
</strong>{{ actor.getSubscribersCount() }}
|
|
</span>
|
|
</div>
|
|
</header>
|
|
<div>
|
|
<section class="profile-bio" title="{% trans %} %actor_nickname%'s bio{% endtrans %}">
|
|
<span>{{ actor.getBio() }}</span>
|
|
</section>
|
|
|
|
<nav class="profile-tags" title="{% trans %} %actor_nickname%'s actor tags{% endtrans %}">
|
|
{% for tag in actor_tags %}
|
|
{% include 'cards/tag/actor_tag.html.twig' with { 'tag': tag, 'actor': actor } %}
|
|
{% endfor %}
|
|
</nav>
|
|
</div>
|
|
{% for block in handle_event('AppendCardProfile', { 'actor': actor }) %}
|
|
{{ block | raw }}
|
|
{% endfor %}
|
|
</section>
|
|
{% endblock profile_view %}
|