Simplified
This commit is contained in:
@@ -3,12 +3,24 @@
|
||||
{% block title %}Mon Blog{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p>{{ post.content|raw }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Aucun article publié.</p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% for post in posts %}
|
||||
<article class="post">
|
||||
<h2>{{ post.title }}</h2>
|
||||
|
||||
<div class="post-meta">
|
||||
<small>Publié le {{ post.createdAt|date("d/m/Y à H:i") }}</small>
|
||||
{% if post.isRecent(7) %}
|
||||
<span class="badge badge-new">Nouveau</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<p>{{ post.getExcerpt(200) }}</p>
|
||||
|
||||
<p>
|
||||
<a href="/article/{{ post.getSlug() }}">Lire la suite →</a>
|
||||
</p>
|
||||
</article>
|
||||
{% else %}
|
||||
<p>Aucun article publié.</p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user