gnu-social/templates/cards/profile/view.html.twig
Diogo Peralta Cordeiro cd6ce3542e
[COMPONENT][Circle] Move circles to a component, various bug fixes
Mention links are now correct
2022-01-05 04:19:22 +00:00

46 lines
2.0 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="{{ actor_nickname }}'s {{ 'profile information.' | trans }}">
<a href="{{ actor_uri }}">
<div class="profile-info">
<img src="{{ actor_avatar }}" class="avatar" alt="{% trans %} %actor_nickname%'s avatar. {% endtrans %}" width="{{actor_avatar_dimensions['width']}}" height="{{actor_avatar_dimensions['height']}}">
<strong class="profile-info-nickname" title="{{ actor_nickname }}{{ '\'s nickname.' | trans }}">{{ actor_nickname }}</strong>
</div>
</a>
{% if not actor_is_local %}
<section class="profile-info-remote">
<span>{{ mention }}</span>
</section>
{% endif %}
<section class="profile-info-bio">
<span>{{ actor.getBio() }}</span>
</section>
<section class="profile-info-stats">
<div><strong><a href="{{ actor.getSubscriptionsUrl() }}">{{ 'Subscribed' | trans }}</a></strong>{{ actor.getSubscribedCount() }}</div>
<div><strong><a href="{{ actor.getSubscribersUrl() }}">{{ 'Subscribers' | trans }}</a></strong>{{ actor.getSubscribersCount() }}</div>
</section>
<nav class="profile-info-tags">
{% for tag in actor_tags %}
{% include 'cards/tag/actor_tag.html.twig' with { 'tag': tag, 'actor': actor } %}
{% endfor %}
</nav>
{% for block in handle_event('AppendCardProfile', { 'actor': actor }) %}
{{ block | raw }}
{% endfor %}
</section>
{% endblock profile_view %}