{% extends 'base.html.twig' %}
{% block section %}
<div class="container g-pt-75 g-pb-45 mt-5">
<div class="row justify-content-center">
<!-- Start Shop Content -->
<div class="col-lg-9 order-lg-2 g-mb-30">
<div class="g-pl-20--lg">
<div class="row justify-content-center">
<div class="col-lg-12">
{% for candidate in candidates %}
{% if candidate.motivation != null %}
<article class="u-shadow-v11 rounded g-pa-15 g-mb-30">
<div class="row align-items-center">
<a class="col-sm-3" href="{{ path('app_front_motivation_show', {id: candidate.motivation.id}) }}">
{% if candidate.motivation.profilePicFileName != "" %}
<img class="img-fluid" src="{{ asset('uploads/profile_pics/' ~ candidate.motivation.profilePicFileName) }}" alt="Gravity">
{% else %}
<img class="img-fluid" src="assets/img-temp/480x700/img1.jpg" alt="Gravity">
{% endif %}
</a>
<div class="col-sm-9 g-brd-left--sm g-brd-gray-light-v4">
<div class="g-py-10 g-px-0">
<header class="d-flex justify-content-start g-mb-3">
<h4 class="h5 d-inline-block text-uppercase g-mr-10">
<a class="g-color-black" href="#">{{ candidate.firstName|lower|capitalize }} {{ candidate.lastName|upper }}</a>
</h4>
<a class="g-color-gray-dark-v5 g-font-style-normal text-uppercase" href="#">{{ candidate.party|upper }}</a>
{% if candidate.socialMedia %}
<ul class="list-inline ml-5">
{% if candidate.socialMedia.meta %}
<li class="list-inline-item g-mx-2">
<a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.meta }}">
<i class="fa fa-facebook"></i>
</a>
</li>
{% endif %}
{% if candidate.socialMedia.tweeter %}
<li class="list-inline-item g-mx-2">
<a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.tweeter }}">
<i class="fa fa-twitter"></i>
</a>
</li>
{% endif %}
{% if candidate.socialMedia.instagram %}
<li class="list-inline-item g-mx-2">
<a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.instagram }}">
<i class="fa fa-instagram"></i>
</a>
</li>
{% endif %}
{% if candidate.socialMedia.linkedIn %}
<li class="list-inline-item g-mx-2">
<a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.linkedIn }}">
<i class="fa fa-linkedin"></i>
</a>
</li>
{% endif %}
{% if candidate.socialMedia.youtube %}
<li class="list-inline-item g-mx-2">
<a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.youtube }}">
<i class="fa fa-youtube"></i>
</a>
</li>
{% endif %}
</ul>
{% endif %}
</header>
<span class="d-block g-color-gray-dark-v4 g-font-size-18 g-mb-10">
<span class="g-color-red g-font-size-15">{{ candidate.slogan }}</span>
</span>
<p class="g-mb-20">
{{ candidate.motivation.content|striptags|slice(0, 200)|raw }} ...
</p>
<ul class="list-inline g-mx-minus-20 g-mb-5 g-pl-7">
{# <li class="list-inline-item info-v5-4__action g-brd-right g-brd-gray-light-v3 g-color-gray-dark-v5 g-pr-15 g-pl-15">#}
{# <i class="align-middle g-font-size-16 g-transition-0_3 g-mr-7 icon-medical-022 u-line-icon-pro"></i>#}
{# <a class="g-color-gray-dark-v5 g-color-primary--hover g-text-underline--none--hover" href="#">Add to Wishlist</a>#}
{# </li>#}
{# <li class="list-inline-item info-v5-4__action g-color-gray-dark-v5 g-pr-10 g-pl-5">#}
{# <i class="align-middle g-font-size-16 g-transition-0_3 g-mr-7 icon-communication-159 u-line-icon-pro"></i>#}
{# <a class="g-color-gray-dark-v5 g-color-primary--hover g-text-underline--none--hover" href="#">Add to Compare</a>#}
{# </li>#}
</ul>
<a href="{{ path('app_front_motivation_show', {id: candidate.motivation.id}) }}">
<button type="button" class="btn btn-lg u-btn-primary g-font-weight-600 g-font-size-12 text-uppercase g-mx-5 g-mt-10">
Voir
</button>
</a>
{% if candidate.getFalc() %}
<a href="{{ path('app_fiche_falc_show', {id: candidate.getFalc().getId()}) }}">
<button type="button" class="btn btn-lg u-btn-primary g-font-weight-600 g-font-size-12 text-uppercase g-mx-5 g-mt-10">
Fiche falc
</button>
</a>
{% endif %}
</div>
</div>
</div>
</article>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
<!-- End Shop Content -->
<!-- Start Shop Sidebar -->
<div class="col-lg-3 order-lg-1 g-brd-right--lg g-brd-gray-light-v4 g-mb-30">
<div class="g-pr-20--lg">
<!-- Start Categories -->
<div class="g-mb-20">
<h3 class="h5 g-color-black g-font-weight-600 g-mb-10">
{% if election_type is defined and election_type == 'REGIONALE' %}
Régions
{% else %}
{{ current_region.name|capitalize }}
{% endif %}
</h3>
<ul class="list-unstyled g-font-size-13 mb-0">
{% if election_type is defined and election_type == 'REGIONALE' %}
{% for region in regions %}
<li>
{% if current_region is defined and current_region.id == region.id %}
<a class="d-block u-link-v5 g-color-blue rounded g-px-20 g-py-8"
href="{{ path('app_region_candidates', {region: region.id, election_type: election_type}) }}">
<i class="mr-2 fa fa-angle-right"></i>
{{ region.name|capitalize }}</a>
{% else %}
<a class="d-block u-link-v5 g-color-gray-dark-v4 rounded g-px-20 g-py-8"
href="{{ path('app_region_candidates', {region: region.id, election_type: election_type}) }}">
<i class="mr-2 fa fa-angle-right"></i>
{{ region.name|capitalize }}</a>
{% endif %}
</li>
{% endfor %}
{% elseif election_type is not defined and communes is defined%}
{% for commune in communes %}
<li>
{% if current_commune is defined and current_commune.id == commune.id %}
<a class="d-block u-link-v5 g-color-blue rounded g-px-20 g-py-8"
href="{{ path('app_commune_candidates', {commune: commune.id, region: current_region.id}) }}">
<i class="mr-2 fa fa-angle-right"></i>
{{ commune.name|capitalize }}</a>
{% else %}
<a class="d-block u-link-v5 g-color-gray-dark-v4 rounded g-px-20 g-py-8"
href="{{ path('app_commune_candidates', {commune: commune.id, region: current_region.id}) }}">
<i class="mr-2 fa fa-angle-right"></i>
{{ commune.name|capitalize }}</a>
{% endif %}
</li>
{% endfor %}
{% else %}
Rien à afficher
{% endif %}
</ul>
</div>
<!-- End Categories -->
<hr class="g-brd-gray-light-v4 g-my-0">
</div>
</div>
<!-- End Shop Sidebar -->
</div>
</div>
{% endblock %}