Simplified

This commit is contained in:
julien
2026-03-09 14:17:05 +01:00
parent e65d79cccb
commit eff05b0971
18 changed files with 1012 additions and 523 deletions

View File

@@ -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 %}