{% extends 'Front/layout.html.twig' %}

{% import 'Front/Default/macro.html.twig' as m %}

{% set metatitle = (maincontent.metatitle ? maincontent.metatitle : maincontent.title) ~ ' : ' ~ testimonial.witness %}
{% set metadescription = null %}

{% block metaOpengraph %}{% endblock %}

{% set bodyClass = parent.class %}

{% set picture = testimonial.getWebPicture() %}

{% block body %}
    <div class="row">
        <div class="content col">
                       <article class="card bg-theme has-round-picture h-auto">
                <header class="item-header">
                        <div class="figure" style="background-image: url({% if picture is not empty %}{{ asset(picture|imagine_filter('250Lx250H'))|replace({' ' : '%20'}) }}{% endif %});"></div>
                        <h3 class="item-title h6 text-no-transform">
                        {{ testimonial.witness }}
                    </h3>
                    <p class="item-occupation text-small">{{ testimonial.occupation }}</p>
               
                    <div class="item-content">
                        <div class="item-desc quote">{{ include('Front/_component/icon.html.twig', {id: 'quote', class:'icon-quote'}) }}{{ testimonial.content|raw }}</div>
                    </div>
                 </header>
            </article>
            
            <br/><br/>
            <p>
                <a class="link-back link-back-theme" href="{{ path('list_testimonials', {id:parent.id, slug:parent.slug}) }}">
                    <span class="bubble bubble-xs">
                        <i class="icon-cgenial icon-arrow-left"></i>
                    </span>
                    Revenir à la liste des témoignages
                </a>
            </p>
        </div>

        {% include "Front/_part/sidebar.html.twig" %}
    </div>
{% endblock %}

{% block before_body %} 
    {% set pageHeaderPicture = ( maincontent.picture ? asset(maincontent.getWebPath()) : null ) %}
    {% set pageHeaderTitle = maincontent.title ~ ' : ' ~ testimonial.witness %}
    {% set pageHeaderIntroduction = maincontent.introduction|replace_custom_keys|raw %}
    {% include "Front/_part/page-header.html.twig" %}
    {{ render(controller('AppBundle:Render:module', { position:'before_body' })) }}
{% endblock %}

{% block after_body %} 
    {{ render(controller('AppBundle:Render:module', { position:'after_body' })) }}
{% endblock %}