{% extends 'layout.html.twig' %}
{% block layout %}
<div class="row">
<!-- NAVBAR LATERALE -->
<div class="d-lg-block col-lg-3">
<div class="list-group" style="position:sticky;top:25px;">
<a href="{{ path('keyword', {keyword: keyword.id, categorie: null}) }}" class="list-group-item list-group-item-action">
Toutes les catégories
</a>
<a href="{{ path('keyword', {keyword: keyword.id, categorie: 'jurisprudences'}) }}" class="list-group-item list-group-item-action">
Les jurisprudences
</a>
<a href="{{ path('keyword', {keyword: keyword.id, categorie: 'infos'}) }}" class="list-group-item list-group-item-action">
Les actualités
</a>
<a href="{{ path('keyword', {keyword: keyword.id, categorie: 'tutos'}) }}" class="list-group-item list-group-item-action">
La Base
</a>
</div>
</div>
<div class="col-lg-9 col-12">
<h2>Mot clé : {{keyword.keyword}}</h2>
<div class="row">
{% for data in dataContent %}
<div class="col-sm-12 col-lg-6" style="padding-bottom: 30px;">
<div class="card" style="border: 1px solid black; height: 100%; min-height: 215px;">
<h5 class="card-header">
<strong>
{{ data.title }}
</strong>
</h5>
<div class="card-body">
<p class="card-text">
<i>
{{ data.content|length > 200 ? data.content|slice(0,200)|raw : data.content|raw }}
{{ data.content|length > 200 ? '...' : ''}}
</i>
</p>
</div>
<div class="card-footer">
{% if data.type == 'tuto' %}
<a href="{{ path('tuto_read', {tutoId: data.id}) }}" style="float:right" class="btn btn-primary">
Lire le tuto
</a>
{% elseif data.type == 'news' %}
<a href="{{ path('news_read', {actuId: data.id}) }}" style="float:right" class="btn btn-primary">
Lire l'actu
</a>
{% else %}
<a href="{{ path('jurisprudence_show', {jurisprudenceId: data.id}) }}" style="float:right" class="btn btn-primary">
Consulter la jurisprudence
</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}