view.html.twig 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {% set actor_nickname = actor.getNickname() %}
  2. {% set actor_avatar = actor.getAvatarUrl() %}
  3. {% set actor_avatar_dimensions = actor.getAvatarDimensions() %}
  4. {% set actor_tags = actor.getSelfTags() %}
  5. {% set actor_has_bio = actor.hasBio() %}
  6. {% set actor_uri = actor.getUri() %}
  7. {% set actor_url = actor.getUrl() %}
  8. {% set actor_is_local = actor.getIsLocal() %}
  9. {% set mention = mention(actor) %}
  10. {% block profile_view %}
  11. <section id='profile-{{ actor.id }}' class='profile'
  12. title="{% trans %} %actor_nickname%'s profile information{% endtrans %}">
  13. <header>
  14. <div class="profile-info">
  15. <img src="{{ actor_avatar }}" class="profile-avatar avatar"
  16. alt="{% trans %} %actor_nickname%'s avatar{% endtrans %}"
  17. title="{% trans %} %actor_nickname%'s avatar{% endtrans %}"
  18. width="{{ actor_avatar_dimensions['width'] }}"
  19. height="{{ actor_avatar_dimensions['height'] }}">
  20. <section>
  21. <a class="profile-info-url" href="{{ actor_uri }}">
  22. <strong class="profile-info-url-nickname"
  23. title="{% trans %} %actor_nickname%'s nickname {% endtrans %}">
  24. {{ actor_nickname }}
  25. </strong>
  26. {% if not actor_is_local %}
  27. <span class="profile-info-url-remote">
  28. {{ mention }}
  29. </span>
  30. {% endif %}
  31. </a>
  32. <ul class="profile-info-actions">
  33. {% for current_action in get_profile_actions(actor) %}
  34. <li>
  35. <a title="{{ current_action["title"] | trans }}"
  36. class="{{ current_action["classes"] }}"
  37. href="{{ current_action["url"] }}"></a>
  38. </li>
  39. {% endfor %}
  40. </ul>
  41. </section>
  42. </div>
  43. <div class="profile-stats">
  44. <span class="profile-stats-subscriptions"
  45. title="{% trans %} %actor_nickname%'s subscribed count{% endtrans %}">
  46. <strong>
  47. <a href="{{ actor.getSubscriptionsUrl() }}">{{ 'Subscribed' | trans }}</a>
  48. </strong>{{ actor.getSubscribedCount() }}
  49. </span>
  50. <span class="profile-stats-subscribers"
  51. title="{% trans %} %actor_nickname%'s subscribers count{% endtrans %}">
  52. <strong>
  53. <a href="{{ actor.getSubscribersUrl() }}">{{ 'Subscribers' | trans }}</a>
  54. </strong>{{ actor.getSubscribersCount() }}
  55. </span>
  56. </div>
  57. </header>
  58. <div>
  59. <section class="profile-bio" title="{% trans %} %actor_nickname%'s bio{% endtrans %}">
  60. <span>{{ actor.getBio() }}</span>
  61. </section>
  62. <nav class="profile-tags" title="{% trans %} %actor_nickname%'s actor tags{% endtrans %}">
  63. {% for tag in actor_tags %}
  64. {% include 'cards/tag/actor_tag.html.twig' with { 'tag': tag, 'actor': actor } %}
  65. {% endfor %}
  66. </nav>
  67. </div>
  68. {% for block in handle_event('AppendCardProfile', { 'actor': actor }) %}
  69. {{ block | raw }}
  70. {% endfor %}
  71. </section>
  72. {% endblock profile_view %}