{% trans_default_domain 'Site' %}
{% extends "main/site/views/common/base.html.twig" %}
{% from ('main/site/views/Partials/icon.html.twig') import icon %}
{% block title %}
{% if page == 1 %}
{{ 'site.testimonies.pageData.title'|trans }}
{% else %}
{{ 'site.testimonies.pageData.title_p'|trans({'%start%': startItem , '%end%': endItem, '%page%': page}) }}
{% endif %}
{% endblock %}
{% block meta_description %}
{% if page == 1 %}
<meta name="description" content="{{ 'site.testimonies.pageData.meta.description'|trans({'%start%': startItem , '%end%': endItem, '%page%': page}) }}">
{% else %}
<meta name="description" content="{{ 'site.testimonies.pageData.meta.description_p'|trans({'%start%': startItem , '%end%': endItem, '%page%': page}) }}">
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{{ GGMarketingTag('visite', app.request.locale, tracking) }}
{% endblock %}
{% block fb_event_tag %}
{% if tracking is defined %}
{{ getFbkEventTag(app.request.locale, tracking, 'visite') }}
{# We want only one tag per page. If no event provided, pageview will be displayed. #}
{% else %}
{{ getFbkEventTag(app.request.locale) }}
{% endif %}
{% endblock %}
{% block page_content %}
<div
class="content" role="main">
{% include "main/site/views/Partials/Heroes/heroBrulafine.html.twig" with {
headerTag: "p"
} %}
{% if siteHasPackForNewUsers() %}
<div class="container-fluid mt-2">
{{ include('main/site/views/Partials/newUserPackBanner.html.twig')}}
</div>
{% endif %}
<section class="section pt-3">
<div class="container-fluid">
<div class="section__title">
<h1 class="text-center underline-bottom">{{ 'site.testimonies.title'|trans }} {% if page > 1 %}{% endif %}
{% if affiliateForLegalNotices(tracking) %}
<sup>*</sup>
{% endif %}
<em style="font-size: 0.45em;vertical-align: bottom;">{{ 'site.common.page'|trans }} {{ page }}</em>
</h1>
{% if affiliateForLegalNotices(tracking) %}
<p class="font-xs">
<sup>*</sup>
{{ 'site.testimonies.paragraph'|trans | raw}}
</p>
<p class="text-center">
{{ 'site.testimonies.paragraph2'|trans | raw }} <sup>*</sup>
</p>
{% endif %}
{# {% if (app.request.locale == 'fr') %} #}
<p class="text-center">
<a href="{{ path('brulafine_temoignage_videos')}}" class="d-inline-flex align-items-center justify-content-center" style="font-weight: bold; font-size: 1.3rem;">
{{ icon('video', 'mr-1') }}
{{ 'site.testimonies.paragraph3'|trans | raw }}
</a>
</p>
{# {% endif %} #}
</div>
{% if testimonies and testimonies | length > 0 %}
<div class="testimonie-list testimonie-list--border mb-2">
{% for item in testimonies %}
<div class="testimonie-list__item">
<div class="testimonie">
<div class="d-flex justify-content-between mb-3">
<div class="testimonie__rating">
<span class="testimonie__rating__holder">
<span data-rating="{{item.rating}}"></span>
</span>
</div>
<div class="testimonie__meta">
{% if item.weightLoss %}
<span>{{ item.weightLoss |round(1, 'floor') }}
{{ 'site.testimonies.kgInfo'|trans }}</span>
{% endif %}
</div>
</div>
<div class="testimonie__review mb-2">
<p>“{{ item.message }}”
{% if affiliateForLegalNotices(tracking) %}*
{% endif %}
</p>
</div>
<div class="d-flex justify-content-between mt-auto">
<div class="testimonie__user">
<h2 class="h5 mb-0 mt-0">
<span {% if item.country %} class="mr-1"{% endif %}>
{{ item.firstname }},
{{ item.city }}
</span>
{% if item.country %}
<img src="{{ asset('/images/main/flags/' ~ item.country | upper ~ '.svg') }}" width="18" alt="{{ item.country }}">
{% endif %}
</h2>
<p class="mb-0 font-sm">{{ item.age }}
{{ 'site.common.age'|trans }}
{# - {{ item.created_at |format_datetime('medium', 'none') }} #}
</p>
</div>
<div class="testimonie__date">
<p class="font-sm">
{{ item.testimonyDate|format_datetime(locale=app.request.locale ,pattern="d MMMM YYYY") }}
</p>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="paging">
{% for i in 1..nb_pages %}
{% if i == 1 %}
<a href="{{path('brulafine_avis_no_page')}}" {% if page == i %} class="is-active" {% endif %}>{{ i }}</a>
{% else %}
<a href="{{path('brulafine_avis', {page: i})}}" {% if page == i %} class="is-active" {% endif %}>{{ i }}</a>
{% endif %}
{% endfor %}
{#
<span>…</span>
<a href="#">12</a>
#}
</div>
{% endif %}
<hr class="invisible mt-0">
{% if affiliateForLegalNotices(tracking) %}
<p class="font-xs">{{ 'site.testimonies.legal'|trans }}</p>
{% endif %}
</div>
</section>
</div>
{% endblock %}