This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/resources/views/yuuno/profile/friends.twig

29 lines
1.2 KiB
Twig
Raw Normal View History

{% 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 class="stylised">Friends</h1>
</div>
<div class="profile-friends">
2016-11-04 16:45:53 +00:00
{% 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 clean" href="{{ route('user.profile', friend.id) }}">
<img src="{{ route('user.avatar', friend.id) }}" alt="{{ friend.username }}" class="friends-list-avatar default-avatar-setting" style="width: 150px; height: 150px;">
<div class="friends-list-name" style="color: {{ friend.colour }};">{{ friend.username }}</div>
</a>
</div>
{% endfor %}
<div class="clear"></div>
2016-11-04 16:45:53 +00:00
{% else %}
<h1 class="stylised" style="text-align: center; margin: 2em auto;">This user has no friends :(</h1>
{% endif %}
</div>
{% if friends|length > 1 %}
<div style="text-align: right;">
{% include 'elements/pagination.twig' %}
</div>
{% endif %}