gnu-social/templates/cards/profile/view.html.twig

45 lines
1.7 KiB
Twig

{% set actor_nickname = actor.getNickname() %}
{% set actor_avatar = actor.getAvatarUrl() %}
{% set actor_tags = actor.getSelfTags() %}
{% set actor_bio = actor.getBio() %}
{% block profile_view %}
<section id='profile-{{ actor.id }}' class='profile' title="{{ actor_nickname }}'s {{ 'profile information.' | trans }}">
<a href="{{ path('actor_view_nickname', {'nickname' : actor_nickname}) }}">
<div class="profile-info">
<img src='{{ actor_avatar }}' class="profile-avatar" alt="{{ actor_nickname }}{{ '\'s avatar.' | trans }}">
<strong class="profile-info-nickname" title="{{ actor_nickname }}{{ '\'s nickname.' | trans }}">{{ actor_nickname }}</strong>
<section class="profile-info-bio">
{% if actor_bio %}
<p>{{ actor_bio }}</p>
{% else %}
<p>{{ '(No bio)' | trans }}</p>
{% endif %}
</section>
</div>
</a>
<section class="profile-info-stats">
<div><strong>{{ 'Subscriptions' | trans }}</strong>{{ actor.getSubscriptionsCount() }}</div>
<div><strong>{{ 'Subscribers' | trans }}</strong>{{ actor.getSubscribersCount() }}</div>
</section>
<nav class="profile-info-tags">
{% if actor_tags %}
{% for tag in actor_tags %}
<a href='#'><em>#{{ tag }}</em></a>
{% endfor %}
{% else %}
{{ '(No tags)' | trans }}
{% endif %}
</nav>
{% for block in handle_event('AppendCardProfile', {'actor': actor}) %}
{{ block | raw }}
{% endfor %}
</section>
<hr>
{% endblock profile_view %}