{% block page %}
<section class="section team" id="team{{ page.sub_group ? '_sub_' ~ page.sub_group }}">
	<h1>{{ page.name }}</h1>
	{% block title %}
		<h2 class="header-text">{{ page.name }}</h2>
		<h3 class="text-center">{{ page.desc }}</h3>
	{% endblock %}
	
	{% block content %}
		<div class="content">
			{# <?include(LAYOUT_PHP_DIR . 'pages/team_articles.php');?> #}
			{# include 'pages/team_articles.twig' #}
			
			{% set classes = {'facebook' : 'facebook', 'twitter' : 'twitter', 'linkedin' : 'linkedin', 'url' : 'globe', 'email' : 'envelope-o'} %}

			{% for member in data.members %}
				{% block article %}
					<article class="col-md-{{ cols }} col-sm-6 col-xs-12">
						<h1>{{ member.name }}</h1>
						
						{% block article_image %}
							<img class="img-responsive" src="/{{ member.src }}" alt="{{ member.name }}" />
						{% endblock %}
						
						{% block article_title %}
							<h2 class="text-center">{{ member.name }}</h2>
							<div class="text-center">{{ member.job }}</div>
						{% endblock %}
						
						{% set social_html = '' %}
						{% for social in ['facebook', 'twitter', 'linkedin', 'url', 'email'] %}
							{% if member[social] %}
								{% set social_html = social_html ~ '<li><a href="' ~ (social == 'email' ? 'mailto:' ~ member[social] : '/l.php?l=' ~ social ~ '&amp;id=' ~ member.id_team) ~ '" target="_blank" class="fa fa-' ~ (classes[social]) ~ '"' ~ ( social == 'url' ? ' title="' ~ text.misc.link_externo ~ '"' ) ~ ' rel="nofollow"></a></li>' %}
							{% endif %}
						{% endfor %}
						
						{% block article_content %}
							{% if social_html %}
								{% block article_social %}
									<div class="social">
										<ul>
											{{ social_html | raw }}
										</ul>
										<div class="clear"></div>
									</div>
								{% endblock article_social %}
							{% endif %}
							
							{{ ('<p>' ~ member.desc ~ '</p>') | preg_replace(cleaner.p.regex, cleaner.p.replace) | raw }}
						{% endblock article_content %}
					</article>
				{% endblock article %}
				
				{% if not loop.last %}
					{{ fn_clearfix(index=loop.index, columns=page.columns) | raw }}
				{% endif %}
			{% endfor %}
			
			<div class="clearfix"></div>
		</div>
	{% endblock content %}
</section>
{% endblock page %}