{% extends 'TopxiaWebBundle:User:layout.html.twig' %}

{% block title %} {{user.truename}}的公共主页 - {{ parent() }}{% endblock %}

{% set pageNav = 'friend' %}

{% block main %}

<div class="row">
	<div class="col-md-12">
		<ul class="nav nav-pills nav-mini userpage-sec-nav">
			<li {% if friendNav == 'following' %}class="active"{% endif %}><a href="{{ path('user_following', {id:user.id}) }}">关注</a></li>
			<li {% if friendNav == 'follower' %}class="active"{% endif %}><a href="{{ path('user_follower', {id:user.id}) }}">粉丝</a></li>
		</ul>
	</div>
</div>


<div class="row">
	{% for friend in friends %}
	<div class="col-md-4">
		<div class="friendcard clearfix">
			<a href="{{ path('user_show', {id:friend.id}) }}"><img src="{{ default_path('avatar',friend.mediumAvatar, '')  }}" class="avatar"></a>
			<div class="infos">
				<a href="{{ path('user_show', {id:friend.id}) }}" class="nickname">{{ friend.nickname }}</a>
				<div class="title">{{ friend.title }}</div>
			</div>
		</div>
	</div>
	{% else %}
	  {% if friendNav == 'following' %}
		  <div class="empty">无关注的人</div>
	  {% elseif friendNav == 'follower' %}
		  <div class="empty">无粉丝</div>
	  {% endif %}
	{% endfor %}
</div>


{% endblock %}