{% set level = min(7, level) %}
{% set col = 12 - (level - 1) %}


<div class="review col-12 offset-{{ level - 1 }} mb-10" id="review-{{ comment.id }}">
    <ul class="flex justify-items-start">
        <li class="mr-8 review-avatar">
            <img src="{{ comment.avatar }}" alt="{{ comment.author }}" title="{{ comment.author }}" class="rounded-full">
        </li>
        <li>
            <p class="mb-5">
                <a rel="author" href="{{ comment.website ? comment.website : ('#review-' ~ comment.id) }}" class="">
                    {{- comment.author }}, <time datetime="{{ comment.createdAt|date("Y-m-d") }}" title="{{ comment.createdAt|date("r") }}">
                        {{- comment.createdAt|date("d/m/Y à H\\hi") -}}
                    </time>
                </a>
            </p>
            <div class="review-body prose-lg">
                {% if comment.createdAt.timestamp > 1538118768 %} {# 28/09/2018 #}
                    {{- comment.content|markdown('comment') -}}
                {% else %}
                    {{- comment.content|comment -}}
                {% endif %}
            </div>
            <div class="review-footer">
                <a href="#form" class="btn btn-sm" data-answer="{{ comment.id }}">
                    {{- 'Répondre' -}}
                </a>
            </div>
        </li>
    </ul>
</div>

{% set level = level + 1 %}

{% for child in comment.comments %}
    {{ include('page/post/_comment.html.twig', {level: level, comment: child}) }}
{% endfor %}
