Merge pull request 'PostController' (#23) from PostController into master
Reviewed-on: #23pull/25/head
commit
f8069aabc1
@ -0,0 +1,33 @@
|
|||||||
|
.comment-wrapper {
|
||||||
|
background-color: #f2f2f7;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 1rem;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
&.nightmare {
|
||||||
|
background-color: #3a3c6e;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-text {
|
||||||
|
p {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form\Type;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
|
class CommentType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('text', TextType::class, [
|
||||||
|
'label' => false
|
||||||
|
])
|
||||||
|
->add('submit', SubmitType::class, [
|
||||||
|
'label' => 'Comment'
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
<div class="comment-wrapper{% if dream %} nightmare{% endif %}">
|
||||||
|
<div class="comment-info">
|
||||||
|
<img src="https://api.dicebear.com/8.x/big-smile/svg?seed={{ comment.profil.name }}" width="35px">
|
||||||
|
<span>{{ comment.profil.name }}</span>
|
||||||
|
{# <span>- {{ post.dateCreated }}</span> #}
|
||||||
|
<span>-</span>
|
||||||
|
{# <span>{{ post.createdAt }}|date('l, F j, Y')</span> #}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="comment-text">
|
||||||
|
<p>{{ comment.text }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
Binary file not shown.
Loading…
Reference in new issue