123456789101112131415161718192021222324252627282930313233343536373839404142 |
- {% extends 'base.html.twig' %}
- {% block title %}{{ parent() }} - Blog{% endblock %}
- {% block body %}
- {% if tag is defined %}
- <section>
- <h1>Etiquette : {{ tag }}</h1>
- </section>
- {% endif %}
- <div>
- <section id="section-articles">
- {% for article in articles %}
- <article class="article-preview">
- <header class="titre-article">
- <h1><a href="{{ path('app_view', {'slug': article.slug}) }}">{{ article.title}}</a></h1>
- <p class="article-by">{{ article.publicationDate | format_date('long') }} - {{ article.author }}</p>
- <p class="article-by">
- {% for tag in article.tags %}
- <a href="{{ path('app_search', {'tag': tag.name}) }}"><span class="tag">{{ tag }}</span></a>
- {% if not loop.last %} {% endif %}
- {% endfor %}
- </p>
- </header>
- <section class="contenu">
- {{ article.content | markdown }}
- </section>
- </article>
- <a href="{{ path('app_view', {'slug': article.slug}) }}">Voir l'article</a>
- {% if is_granted('edit', article) %}
- <a class="btn btn-blue" href="{{ path('app_article_edit', {'id': article.id}) }}">Modifier cet article</a>
- {% endif %}
- <hr>
- {% else %}
- <p class="remarque">Rien pour le moment</p>
- {% endfor %}
- </section>
- </div>
- {% endblock %}
|