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

28 lines
1 KiB
Twig
Raw Permalink Normal View History

2017-03-23 15:01:53 +00:00
{% from '@yuuno/macros.twig' import pagination %}
2016-12-21 20:00:26 +00:00
{% set friends = profile.friends(2)|batch(12) %}
<div class="new-profile-mode-title">
2016-11-08 19:56:37 +00:00
<h1>Friends</h1>
</div>
2016-11-09 18:32:23 +00:00
<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] %}
2016-11-10 22:32:45 +00:00
<a class="friend-box" id="friendslist-friend-{{ friend.id }}" href="{{ route('user.profile', friend.id) }}">
<div class="avatar avatar--border friend-box__avatar" style="background-image: url('{{ route('user.avatar', friend.id) }}')"></div>
<div class="friend-box__name" style="color: {{ friend.colour }}">
{{ friend.username }}
</div>
</a>
2016-11-04 16:45:53 +00:00
{% endfor %}
2016-11-09 18:32:23 +00:00
<div class="clear"></div>
2016-11-04 16:45:53 +00:00
{% else %}
2016-11-09 18:32:23 +00:00
<h1 class="profile__friends--none">This user has no friends :(</h1>
2016-11-04 16:45:53 +00:00
{% endif %}
</div>
{% if friends|length > 1 %}
<div style="text-align: right;">
2016-12-21 20:00:26 +00:00
{{ pagination(route('user.profile', profile.id), friends, get.page|default(1)) }}
</div>
{% endif %}