|
|
|
@ -1,5 +1,9 @@
|
|
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
|
|
{% if post.dream %}
|
|
|
|
|
{% set nightmare = 'nightmare' %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% block stylesheets %}
|
|
|
|
|
<link rel="stylesheet" href="{{ asset('css/components/post.css') }}">
|
|
|
|
|
<link rel="stylesheet" href="{{ asset('css/components/form.css') }}">
|
|
|
|
@ -9,13 +13,14 @@
|
|
|
|
|
{% block title %}{{ post.title }}{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
|
<div id="post-wrapper">
|
|
|
|
|
<div id="post-wrapper" class="{% if post.dream %}nightmare{% endif %}">
|
|
|
|
|
<div id="post">
|
|
|
|
|
<div id="post-info">
|
|
|
|
|
<img src="https://api.dicebear.com/8.x/big-smile/svg?seed={{ post.profil.name }}" width="50px">
|
|
|
|
|
<span>{{ post.profil.name }}</span>
|
|
|
|
|
{# <span>- {{ post.dateCreated }}</span> #}
|
|
|
|
|
<span>- Il y a 3 jours</span>
|
|
|
|
|
<span>-</span>
|
|
|
|
|
<span>{{ post.createdAt|date('l, F j, Y') }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h1 id="post-title">{{ post.title }}</h1>
|
|
|
|
@ -26,13 +31,16 @@
|
|
|
|
|
|
|
|
|
|
<div id="comments">
|
|
|
|
|
<h2>Comments</h2>
|
|
|
|
|
<div class="form-container">
|
|
|
|
|
{{ form(commentForm) }}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% if is_granted('ROLE_USER') %}
|
|
|
|
|
<div class="form-container">
|
|
|
|
|
{{ form(commentForm) }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<div id="comments-wrapper">
|
|
|
|
|
{% for comment in post.commentaries %}
|
|
|
|
|
{% include 'comment/comment.html.twig' with { 'comment' : comment} %}
|
|
|
|
|
{% include 'comment/comment.html.twig' with { 'comment' : comment, 'dream' : post.dream } %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|