28 lines
1.1 KiB
Twig
28 lines
1.1 KiB
Twig
{% set friends = profile.friends(2)|batch(12) %}
|
|
|
|
{% set paginationPages = friends %}
|
|
{% set paginationUrl %}{{ route('user.profile', profile.id) }}{% endset %}
|
|
|
|
<div class="new-profile-mode-title">
|
|
<h1>Friends</h1>
|
|
</div>
|
|
<div class="profile__friends">
|
|
{% if friends|length > 0 %}
|
|
{% for friend in friends[get.page|default(1) - 1] %}
|
|
<div class="friend-container" id="friendslist-friend-{{ friend.id }}">
|
|
<a class="friends-list-data" href="{{ route('user.profile', friend.id) }}">
|
|
<img src="{{ route('user.avatar', friend.id) }}" alt="{{ friend.username }}" class="friends-list-avatar avatar avatar--border" style="width: 150px; height: 150px;">
|
|
<div class="friends-list-name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
<div class="clear"></div>
|
|
{% else %}
|
|
<h1 class="profile__friends--none">This user has no friends :(</h1>
|
|
{% endif %}
|
|
</div>
|
|
{% if friends|length > 1 %}
|
|
<div style="text-align: right;">
|
|
{% include 'elements/pagination.twig' %}
|
|
</div>
|
|
{% endif %}
|