parent
4fc23ec9c8
commit
d0e86b9201
@ -1,3 +0,0 @@
|
|||||||
SELECT * FROM profil;
|
|
||||||
|
|
||||||
SELECT * FROM profil_profil;
|
|
@ -1,70 +0,0 @@
|
|||||||
{# templates/post/show.html.twig #}
|
|
||||||
|
|
||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Post - {{ post.title }}{% endblock %}
|
|
||||||
|
|
||||||
{% block stylesheets %}
|
|
||||||
<style>
|
|
||||||
.post-container {
|
|
||||||
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.profile-name {
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
.post-title {
|
|
||||||
font-size: 2em;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
.post-text {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.votes {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.tags {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.commentary {
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.commentary-author {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<div class="post-container" style="background-color: {{ post.isDream ? '#bda3b6' : '#1a2c4c' }}">
|
|
||||||
<h3 class="profile-name">{{ post.profil.name }}</h3>
|
|
||||||
<h2 class="post-title">{{ post.title }}</h2>
|
|
||||||
<p class="post-text">{{ post.text }}</p>
|
|
||||||
<div class="votes">
|
|
||||||
<span>Up Votes: {{ post.upVote }}</span> / <span>Down Votes: {{ post.downVote }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="tags">
|
|
||||||
<h4>Tags:</h4>
|
|
||||||
<ul>
|
|
||||||
{% for tag in post.tags %}
|
|
||||||
<li>{{ tag.name }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="commentaries">
|
|
||||||
<h4>Commentaires:</h4>
|
|
||||||
{% for commentary in post.commentaries %}
|
|
||||||
<div class="commentary">
|
|
||||||
<div class="commentary-author">{{ commentary.profil.name }}</div>
|
|
||||||
<div class="commentary-text">{{ commentary.text }}</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
@ -0,0 +1,55 @@
|
|||||||
|
{# templates/profil/list.html.twig #}
|
||||||
|
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Liste des Profils{% endblock %}
|
||||||
|
|
||||||
|
{% block stylesheets %}
|
||||||
|
<link rel="stylesheet" href="{{ asset('styles/app.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ asset('public/css/components/profil.css') }}">
|
||||||
|
<style>
|
||||||
|
.profile-list {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.profile-card {
|
||||||
|
width: calc(100% / 5);
|
||||||
|
padding: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
.profile-card img {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.profile-card a {
|
||||||
|
display: block;
|
||||||
|
margin-top: 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.profile-card a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<h1> {{title }} : </h1>
|
||||||
|
<div class="profile-list">
|
||||||
|
{% for profil in profils %}
|
||||||
|
<div class="profile-card">
|
||||||
|
<img src="https://api.dicebear.com/8.x/big-smile/svg?seed={{ profil.name }}" alt="Profile Image">
|
||||||
|
<a href="{{ path('profil_show', {id: profil.id}) }}">{{ profil.name }}</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block javascripts %}
|
||||||
|
<script src="{{ asset('scripts/scripts.js') }}"></script>
|
||||||
|
{% endblock %}
|
Binary file not shown.
Loading…
Reference in new issue