{% set full = full is defined and full %}
{% if post.isQuick %} {{ include('page/post/_quick_post.html.twig') }} {% else %} {% if not full %}

{{- post.title -}}

{% endif %}
{%- if post.recommandedPost -%}
Cet article est déprécié
Article recommandé : {{ post.recommandedPost.title }}
{%- endif -%} {% if post.contentFormat == 'html' %} {{- post.content|murph_url|file_attributes|post -}} {% elseif post.contentFormat == 'markdown' %} {{- post.content|murph_url|file_attributes|markdown('post')|lazy_load -}} {% elseif post.contentFormat == 'editorjs' %} {{- post.content|murph_url|file_attributes|editorjs_to_html|raw -}} {% endif %}
{% endif %}
{% if full %} {% set description = setting('post_author_description') %} {%- if description and not post.isQuick -%}
{%- set avatar = setting('avatar_image') -%} {%- if avatar -%} {%- endif -%}
{%- endif -%} {%- if similarPosts is defined and similarPosts|length > 0 -%}
{% for item in similarPosts %}
{{ include('page/post/_post_card.html.twig', {post: item, summarySize: 100}) }}
{% endfor %}
{%- endif -%}

{% set comments = post.comments({ isActive: true, isFirstLevel: true }) %} {% if comments|length %} {% for comment in comments %} {{ include('page/post/_comment.html.twig', {comment: comment, level: 1}) }} {% endfor %} {% endif %} {% form_theme form with "form_div_layout.html.twig" %}
Ajouter un commentaire
{{ form_label(form.author, null, {label_attr: {class: 'label'}}) }} {{ form_widget(form.author, {attr: {class: 'input input-bordered w-full'}}) }} {{ form_errors(form.author) }}
{{ form_label(form.website, null, {label_attr: {class: 'label'}}) }} {{ form_widget(form.website, {attr: {class: 'input input-bordered w-full'}}) }} {{ form_errors(form.website) }}
{{ form_label(form.email, null, {label_attr: {class: 'label'}}) }} {{ form_widget(form.email, {attr: {class: 'input input-bordered w-full'}}) }} {{ form_errors(form.email) }}
{{ form_widget(form.follow, {attr: {class: 'checkbox'}}) }}

{{- 'Votre commentaire - Vous pouvez utiliser du markdown ' }}

{{ form_errors(form.content) }} {{ form_widget(form.content, {attr: {cols: 30, rows: 10, class: 'textarea textarea-bordered w-full'}}) }}
{{ form_label(form.captcha, null, {label_attr: {class: 'label'}}) }} {{ form_widget(form.captcha, {attr: {class: 'input input-bordered'}}) }}
{{ form_rest(form) }}
{% if not post.isQuick %} {% set ld = { '@context': 'http://schema.org/', '@type': 'BlogPosting', 'headline': post.title, 'author': { '@type': 'Person', 'name': 'Simon Vieille' }, 'publisher': { '@type': 'Organization', 'name': 'Deblan blog', 'logo': { '@type': 'imageObject', 'url': asset('build/images/logo.png') } }, 'datePublished': post.publishedAt|date("c"), 'dateModified': post.updatedAt|date("c"), 'image': post.image ? asset(post.image) : null } %} {% endif %} {% endif %}