gnu-social/templates/cards/profile/view.html.twig
Eliseu Amaro 671c3968e2
[TWIG][Templates] Rename inconsistent CSS classes
[CSS] Font size hierarchy refactor
[PLUGINS][MediaFeed] Renamed BeforeFeed event

Type scale hierarchy redone. Bigger line height added, making it easier
to click on links and separate contents.

Feed title added. AddFeedActions replaces BeforeFeed event.
MediaFeed links will now show an icon to the right of the feed title,
smaller footprint and more consistent with the overall design.
2021-12-24 02:46:44 +00:00

45 lines
1.9 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_bio = actor.getBio() %}
{% set actor_uri = actor.getUri() %}
{% 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="profile-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>
<section class="profile-info-bio">
{% if actor_bio %}
<span>{{ actor_bio }}</span>
{% else %}
<span>{{ '(No bio)' | trans }}</span>
{% endif %}
</section>
</div>
</a>
<section class="profile-info-stats">
<div><strong>{{ 'Subscribed' | trans }}</strong>{{ actor.getSubscribedCount() }}</div>
<div><strong>{{ 'Subscribers' | trans }}</strong>{{ actor.getSubscribersCount() }}</div>
</section>
<nav class="profile-info-tags">
{% if actor_tags %}
{% for tag in actor_tags %}
{% include 'cards/tag/actor_tag.html.twig' with { 'tag': tag, 'actor': actor } %}
{% endfor %}
{% else %}
{{ '(No tags)' | trans }}
{% endif %}
</nav>
{% for block in handle_event('AppendCardProfile', { 'actor': actor }) %}
{{ block | raw }}
{% endfor %}
</section>
{% endblock profile_view %}