You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

{% 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') }}">
<link rel="stylesheet" href="{{ asset('css/components/comment.css') }}">
{% endblock %}
{% block title %}{{ post.title }}{% endblock %}
{% block body %}
<div id="post-wrapper" class="{% if post.dream %}nightmare{% endif %}">
<div id="post">
<div id="post-info">
<a href="{{ path('profil_show', {'id': post.profil.id}) }}">
<img src="https://api.dicebear.com/8.x/big-smile/svg?seed={{ post.profil.name }}" width="50px">
</a>
<span>{{ post.profil.name }}</span>
{# <span>- {{ post.dateCreated }}</span> #}
<span>-</span>
<span>{{ post.createdAt|date('l, F j, Y') }}</span>
</div>
<h1 id="post-title">{{ post.title }}</h1>
<p>{{ post.text }}</p>
</div>
<hr>
<div id="comments">
<h2>Comments</h2>
{% 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, 'dream' : post.dream } %}
{% endfor %}
</div>
</div>
</div>
{% endblock %}